/*! lzf */

!function (t) {
    "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? t(require("jquery")) : t(jQuery)
}(function (f) {
    var n = /\+/g;

    function g(t) {
        return v.raw ? t : encodeURIComponent(t)
    }

    function m(t, e) {
        var i = v.raw ? t : function (t) {
            0 === t.indexOf('"') && (t = t.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
            try {
                return t = decodeURIComponent(t.replace(n, " ")), v.json ? JSON.parse(t) : t
            } catch (t) {
            }
        }(t);
        return f.isFunction(e) ? e(i) : i
    }

    var v = f.cookie = function (t, e, i) {
        if (void 0 !== e && !f.isFunction(e)) {
            if ("number" == typeof(i = f.extend({}, v.defaults, i)).expires) {
                var n = i.expires, r = i.expires = new Date;
                r.setTime(+r + 864e5 * n)
            }
            return document.cookie = [g(t), "=", (a = e, g(v.json ? JSON.stringify(a) : String(a))), i.expires ? "; expires=" + i.expires.toUTCString() : "", i.path ? "; path=" + i.path : "", i.domain ? "; domain=" + i.domain : "", i.secure ? "; secure" : ""].join("")
        }
        for (var a, s, o = t ? void 0 : {}, d = document.cookie ? document.cookie.split("; ") : [], l = 0, c = d.length; l < c; l++) {
            var u = d[l].split("="), p = (s = u.shift(), v.raw ? s : decodeURIComponent(s)), h = u.join("=");
            if (t && t === p) {
                o = m(h, e);
                break
            }
            t || void 0 === (h = m(h)) || (o[p] = h)
        }
        return o
    };
    v.defaults = {}, f.removeCookie = function (t, e) {
        return void 0 !== f.cookie(t) && (f.cookie(t, "", f.extend({}, e, {expires: -1})), !f.cookie(t))
    }
});
var artForm = function () {
    function n(t) {
        var e = {}, i = [];
        return $(t).find("input").each(function () {
            if ("submit" != this.type && 0 == $(this).hasClass("not-post") && 0 == this.disabled && "none" != $(this).css("display") && "none" != $(this).parent().css("display") && "none" != $(this).parent().parent().css("display") && "none" != $(this).parent().parent().parent().css("display")) switch (this.type) {
                case"checkbox":
                    1 == this.checked && (this.name ? e[this.name] = this.value : i.push(this.value));
                    break;
                default:
                    e[this.name] = this.value
            }
        }), $(t).find("select").each(function () {
            0 == $(this).hasClass("not-post") && 0 == this.disabled && "none" != $(this).css("display") && "none" != $(this).parent().css("display") && "none" != $(this).parent().parent().css("display") && "none" != $(this).parent().parent().parent().css("display") && (e[this.name] = $.trim($(this).find("option:selected").val()))
        }), $(t).find("textarea").each(function () {
            0 == $(this).hasClass("not-post") && 0 == this.disabled && "none" != $(this).css("display") && (e[this.name] = $.trim(this.value))
        }), 0 < i.length && (e.items = i), e
    }

    return {
        validate: function (t, e, i) {
            $("#" + t).validate({
                rules: e.rules, messages: e.messages, onfocusin: function (t) {
                    $(t).valid()
                }, submitHandler: function (t) {
                    var e = n(t);
                    i(e, t, !1)
                }
            })
        }, getData: function (t) {
            return n(t)
        }
    }
}();

function md5(t) {
    function d(t, e) {
        return t << e | t >>> 32 - e
    }

    function l(t, e) {
        var i, n, r, a, s;
        return r = 2147483648 & t, a = 2147483648 & e, s = (1073741823 & t) + (1073741823 & e), (i = 1073741824 & t) & (n = 1073741824 & e) ? 2147483648 ^ s ^ r ^ a : i | n ? 1073741824 & s ? 3221225472 ^ s ^ r ^ a : 1073741824 ^ s ^ r ^ a : s ^ r ^ a
    }

    function e(t, e, i, n, r, a, s) {
        var o;
        return l(d(t = l(t, l(l((o = e) & i | ~o & n, r), s)), a), e)
    }

    function i(t, e, i, n, r, a, s) {
        var o;
        return l(d(t = l(t, l(l(e & (o = n) | i & ~o, r), s)), a), e)
    }

    function n(t, e, i, n, r, a, s) {
        return l(d(t = l(t, l(l(e ^ i ^ n, r), s)), a), e)
    }

    function r(t, e, i, n, r, a, s) {
        return l(d(t = l(t, l(l(i ^ (e | ~n), r), s)), a), e)
    }

    function a(t) {
        var e, i = "", n = "";
        for (e = 0; e <= 3; e++) i += (n = "0" + (t >>> 8 * e & 255).toString(16)).substr(n.length - 2, 2);
        return i
    }

    var s, o, c, u, p, h, f, g, m, v = Array();
    for (v = function (t) {
        for (var e, i = t.length, n = i + 8, r = 16 * ((n - n % 64) / 64 + 1), a = Array(r - 1), s = 0, o = 0; o < i;) s = o % 4 * 8, a[e = (o - o % 4) / 4] = a[e] | t.charCodeAt(o) << s, o++;
        return s = o % 4 * 8, a[e = (o - o % 4) / 4] = a[e] | 128 << s, a[r - 2] = i << 3, a[r - 1] = i >>> 29, a
    }(t = function (t) {
        t = t.replace(/\r\n/g, "\n");
        for (var e = "", i = 0; i < t.length; i++) {
            var n = t.charCodeAt(i);
            n < 128 ? e += String.fromCharCode(n) : (127 < n && n < 2048 ? e += String.fromCharCode(n >> 6 | 192) : (e += String.fromCharCode(n >> 12 | 224), e += String.fromCharCode(n >> 6 & 63 | 128)), e += String.fromCharCode(63 & n | 128))
        }
        return e
    }(t)), h = 1732584193, f = 4023233417, g = 2562383102, m = 271733878, s = 0; s < v.length; s += 16) f = r(f = r(f = r(f = r(f = n(f = n(f = n(f = n(f = i(f = i(f = i(f = i(f = e(f = e(f = e(f = e(c = f, g = e(u = g, m = e(p = m, h = e(o = h, f, g, m, v[s + 0], 7, 3614090360), f, g, v[s + 1], 12, 3905402710), h, f, v[s + 2], 17, 606105819), m, h, v[s + 3], 22, 3250441966), g = e(g, m = e(m, h = e(h, f, g, m, v[s + 4], 7, 4118548399), f, g, v[s + 5], 12, 1200080426), h, f, v[s + 6], 17, 2821735955), m, h, v[s + 7], 22, 4249261313), g = e(g, m = e(m, h = e(h, f, g, m, v[s + 8], 7, 1770035416), f, g, v[s + 9], 12, 2336552879), h, f, v[s + 10], 17, 4294925233), m, h, v[s + 11], 22, 2304563134), g = e(g, m = e(m, h = e(h, f, g, m, v[s + 12], 7, 1804603682), f, g, v[s + 13], 12, 4254626195), h, f, v[s + 14], 17, 2792965006), m, h, v[s + 15], 22, 1236535329), g = i(g, m = i(m, h = i(h, f, g, m, v[s + 1], 5, 4129170786), f, g, v[s + 6], 9, 3225465664), h, f, v[s + 11], 14, 643717713), m, h, v[s + 0], 20, 3921069994), g = i(g, m = i(m, h = i(h, f, g, m, v[s + 5], 5, 3593408605), f, g, v[s + 10], 9, 38016083), h, f, v[s + 15], 14, 3634488961), m, h, v[s + 4], 20, 3889429448), g = i(g, m = i(m, h = i(h, f, g, m, v[s + 9], 5, 568446438), f, g, v[s + 14], 9, 3275163606), h, f, v[s + 3], 14, 4107603335), m, h, v[s + 8], 20, 1163531501), g = i(g, m = i(m, h = i(h, f, g, m, v[s + 13], 5, 2850285829), f, g, v[s + 2], 9, 4243563512), h, f, v[s + 7], 14, 1735328473), m, h, v[s + 12], 20, 2368359562), g = n(g, m = n(m, h = n(h, f, g, m, v[s + 5], 4, 4294588738), f, g, v[s + 8], 11, 2272392833), h, f, v[s + 11], 16, 1839030562), m, h, v[s + 14], 23, 4259657740), g = n(g, m = n(m, h = n(h, f, g, m, v[s + 1], 4, 2763975236), f, g, v[s + 4], 11, 1272893353), h, f, v[s + 7], 16, 4139469664), m, h, v[s + 10], 23, 3200236656), g = n(g, m = n(m, h = n(h, f, g, m, v[s + 13], 4, 681279174), f, g, v[s + 0], 11, 3936430074), h, f, v[s + 3], 16, 3572445317), m, h, v[s + 6], 23, 76029189), g = n(g, m = n(m, h = n(h, f, g, m, v[s + 9], 4, 3654602809), f, g, v[s + 12], 11, 3873151461), h, f, v[s + 15], 16, 530742520), m, h, v[s + 2], 23, 3299628645), g = r(g, m = r(m, h = r(h, f, g, m, v[s + 0], 6, 4096336452), f, g, v[s + 7], 10, 1126891415), h, f, v[s + 14], 15, 2878612391), m, h, v[s + 5], 21, 4237533241), g = r(g, m = r(m, h = r(h, f, g, m, v[s + 12], 6, 1700485571), f, g, v[s + 3], 10, 2399980690), h, f, v[s + 10], 15, 4293915773), m, h, v[s + 1], 21, 2240044497), g = r(g, m = r(m, h = r(h, f, g, m, v[s + 8], 6, 1873313359), f, g, v[s + 15], 10, 4264355552), h, f, v[s + 6], 15, 2734768916), m, h, v[s + 13], 21, 1309151649), g = r(g, m = r(m, h = r(h, f, g, m, v[s + 4], 6, 4149444226), f, g, v[s + 11], 10, 3174756917), h, f, v[s + 2], 15, 718787259), m, h, v[s + 9], 21, 3951481745), h = l(h, o), f = l(f, c), g = l(g, u), m = l(m, p);
    return (a(h) + a(f) + a(g) + a(m)).toLowerCase()
}

var base = function (r) {
    return r.back = function (t) {
        var e = "", i = window.location.href;
        0 < document.referrer.length && (e = document.referrer), "undefined" != typeof opener && null != opener && 0 == e.length && 0 < opener.location.href.length && (e = opener.location.href), e && 1 != history.length && (e.match("zufun.cn") || e.match("yizhaofang.cn")) ? history.go(t) : i.match("platform") ? window.location.href = "https://m.zufun.cn/platform?closeMobile=true" : i.match("/user") ? window.location.href = "https://m.zufun.cn/user" : window.location.href = "https://m.zufun.cn/?closeMobile=true"
    }, r.is_weixn = function () {
        var t = navigator.userAgent.toLowerCase();
        return "micromessenger" == t.match(/MicroMessenger/i) && !/iphone|ipad|ipod/.test(t)
    }, r.numToChinese = function (t) {
        if (isNaN(t)) return "N";
        var e = ["", "", "十", "百", "千", "万", "十万", "百万", "千万", "亿"],
            i = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], n = new String(t);
        if (9 < n.length) return "N";
        for (var r, a = t < 0 ? "负" : "", s = !1, o = 0; o < n.length; o++) 0 == (r = parseInt(n.substr(o, 1))) ? s = !0 : (1 == s && (a += "零", s = !1), e[n.length - o].length <= 1 || o + 1 < n.length && 0 == parseInt(n.substr(o + 1, 1)) ? a += i[r] + e[n.length - o] : a += i[r] + e[n.length - o].substr(0, 1));
        return a
    }, r.alert = function (t) {
        var e;
        "" != t && void 0 !== t || (t = "正在加载"), e = '<div id="Loading" style="position:absolute; z-index:1000; width:100%; background-color: #4e4e4e;top:60px;text-align: center;color: #f8f8f8;padding: 10px 15px;font-size:16px;border-radius:3px;"><div class="spinner" style="float:left;margin-right:10px;"><img src="images/loading.svg" width="24" height="24"></div><span>' + t + "</span></div>", $("body").append(e)
    }, r.alertClose = function () {
        $("#loading").remove()
    }, r.jugePostData = function (t) {
        var e = !0;
        for (var i in t) {
            var n = t[i];
            if ("" == n || void 0 === n) {
                e = !1;
                break
            }
        }
        return e
    }, r.loading = function (t) {
        $(".loading").eq(0).remove();
        t = t || {};
        this.__holder = "body", this.__msg = t.msg || "努力加载中", this.__remove = t.remove || !1, this.__spinner = t.spinner || !0, this.__html = "<span>" + this.__msg + "</span>", "init" == this.__spinner && (this.__html = this.__msg), $(this.__holder).append("<div class='loading'>" + this.__html + "</div>"), this.__remove && setTimeout(function () {
            $(".loading").remove()
        }, 2e3)
    }, r.getArgs = function () {
        var t = new Object;
        query = location.search.substring(1), pairs = query.split("&");
        for (var e = 0; e < pairs.length; e++) {
            var i = pairs[e].indexOf("=");
            if (-1 != i) {
                var n = pairs[e].substring(0, i), r = pairs[e].substring(i + 1);
                r = decodeURIComponent(r), t[n] = r
            }
        }
        return t
    }, r.getElementLeft = function (t) {
        for (var e = t.offsetLeft, i = t.offsetParent; null !== i;) e += i.offsetLeft, i = i.offsetParent;
        return e
    }, r.getElementTop = function (t) {
        for (var e = t.offsetTop, i = t.offsetParent; null !== i;) e += i.offsetTop, i = i.offsetParent;
        return e
    }, r.appendBox = function (t) {
        this._target = t.target, this._dom = t.dom, this._offset = t.offset, $(".zufun_good").remove();
        var e = this._target.offset();
        this._div = document.createElement("div"), this._div.className = "zufun_good", this._div.style.position = "absolute", this._div.style.left = e.left + this._target.width() + this._offset.x + "px", this._div.style.top = e.top + this._offset.y + "px", this._div.innerHTML = this._dom, $("body").append(this._div)
    }, r.removeBox = function () {
        $(".zufun_good").remove()
    }, r.alertMsg = function (t) {
        $(".alertMsg").remove(), this._text = t.text, this._color = "#000", this._time = 2e3, this._offset = {
            x: "0px",
            y: "120px"
        }, this._postion = t.position || "top", void 0 !== t.color && (this._color = t.color), void 0 !== t.offset && (this._offset = t.offset), void 0 !== t.time && (this._time = t.time), this._div = document.createElement("div"), this._div.style.width = "100%", this._div.style.height = "35px", this._div.style.position = "fixed", this._div.className = "alertMsg", this._div.style.zIndex = "99999", this._div.style.textAlign = "center", this._div.style.filter = "alpha(opacity=60)", "center" == this._postion ? (this._div.style.top = "0px", this._div.style.left = "0px", this._div.style.bottom = "0px", this._div.style.right = "0px", this._div.style.margin = "auto") : (this._div.style.top = this._offset.y, this._div.style.left = this._offset.x);
        var e = '<span style="position:relative; color:#fff; padding:8px 40px; border-radius:2px; background-color:#000; opacity:0.6; filter:alpha(opacity=60); margin:0 auto; display:inline-block;">' + this._text + "</span>";
        this._div.innerHTML = e, document.body.appendChild(this._div), setTimeout(function () {
            $(".alertMsg").remove()
        }, this._time)
    }, r.trim = function (t, e) {
        var i = "";
        return i = t.replace(/(^\s+)|(\s+$)/g, ""), "g" == e.toLowerCase() && (i = i.replace(/\s/g, "")), i
    }, r.site_url = function (t) {
        var e = t || "";
        return $.trim(window.location.protocol + "//" + window.location.host + "/" + e)
    }, r.button_loading = function (t, e) {
        var i = null, n = e || 0, r = !0;
        return t ? (i = $(t).find("button").eq(n)).length <= 0 && (r = !1, i = $(t).find("input[type='submit']").eq(0)) : i = $(".ui-dialog-autofocus").eq(n), r ? "加载..." != i.text() && (i.text("加载..."), !0) : "加载..." != i.val() && (i.val("加载..."), !0)
    }, r.reset_button = function (t, e, i) {
        var n = null, r = (e = e || "确定", i = i || 0, !0);
        t ? (n = $(t).find("button").eq(i)).length <= 0 && (r = !1, n = $(t).find("input[type='submit']").eq(0)) : n = $(".ui-dialog-autofocus").eq(i), r ? n.text(e) : n.val(e)
    }, r.lock = function (t) {
        return $(t).find('input[type="submit"],button').attr("disabled", !0), !0
    }, r.unlock = function (t) {
        $(t).find('input[type="submit"],button').attr("disabled", !1)
    }, r.flash_version = function () {
        var t = 0;
        if (document.all) try {
            var e;
            (e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) && (1, VSwf = e.GetVariable("$version"), t = parseInt(VSwf.split(" ")[1].split(",")[0]))
        } catch (t) {
        } else if (navigator.plugins && 0 < navigator.plugins.length && (e = navigator.plugins["Shockwave Flash"])) {
            1;
            for (var i = e.description.split(" "), n = 0; n < i.length; ++n) isNaN(parseInt(i[n])) || (t = parseInt(i[n]))
        }
        return t
    }, r.data_browser = [{string: navigator.userAgent, subString: "Chrome", identity: !1}, {
        string: navigator.userAgent,
        subString: "OmniWeb",
        versionSearch: "OmniWeb/",
        identity: !1
    }, {string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: !1}, {
        prop: window.opera,
        identity: !1
    }, {string: navigator.vendor, subString: "iCab", identity: !1}, {
        string: navigator.vendor,
        subString: "KDE",
        identity: !1
    }, {string: navigator.userAgent, subString: "Firefox", identity: !1}, {
        string: navigator.vendor,
        subString: "Camino",
        identity: !1
    }, {string: navigator.userAgent, subString: "Netscape", identity: !1}, {
        string: navigator.userAgent,
        subString: "MSIE",
        identity: !0,
        versionSearch: "MSIE"
    }, {
        string: navigator.userAgent,
        subString: "Gecko",
        identity: !1,
        versionSearch: "rv"
    }, {
        string: navigator.userAgent,
        subString: "Mozilla",
        identity: !1,
        versionSearch: "Mozilla"
    }], r.is_ie = function () {
        for (var t = r.data_browser, e = 0; e < t.length; e++) {
            var i = t[e].string, n = t[e].prop;
            if (this.versionSearchString = t[e].versionSearch || t[e].identity, i) {
                if (-1 != i.indexOf(t[e].subString)) return t[e].identity
            } else if (n) return t[e].identity
        }
    }, r.fuck_ie_version = function (t) {
        navigator.appName;
        var e = navigator.appVersion.split(";");
        if (1 < e.length && parseInt(e[1].replace(/[ ]/g, "").replace(/MSIE/g, "")) < t) return !0;
        return !1
    }, r.reload = function (t) {
        t = t || "操作成功";
        base.alertMsg({text: t}), window.location.reload()
    }, r.drop_tips = function (s) {
        if ("searchModal" == s.type) var o = s.input, t = s.holder; else o = $(s.input), t = s.holder || "body";
        var d = $('<div id="drop_tips_wrap" class="drop-tips-wrap"></div>'),
            e = s.top || o.offset().top + o.outerHeight() - 1, i = s.left || o.offset().left;
        "app" != s.platform && d.css({top: e + "px", left: i + "px", width: o.innerWidth() + "px"});
        var l = "", n = !0, c = function () {
            d.hide()
        }, r = function (t) {
            if ("block" == d.css("display") && 38 == t.keyCode || 40 == t.keyCode) {
                var e = d.find(".drop-tip-item.hover");
                if (38 == t.keyCode) if (0 < e.length) {
                    var i = e.removeClass("hover").prev();
                    0 < i.length && (i.addClass("hover"), l = i.attr("data-value"), o.val(l))
                } else {
                    var n = d.find(".drop-tip-item:last");
                    n.addClass("hover"), l = n.attr("data-value"), o.val(l)
                } else if (40 == t.keyCode) if (0 < e.length) {
                    var r = e.removeClass("hover").next();
                    0 < r.length && (r.addClass("hover"), l = r.attr("data-value"), o.val(l).attr("data-id", r.attr("data-id")))
                } else {
                    var a = d.find(".drop-tip-item:first");
                    a.addClass("hover"), l = a.attr("data-value"), o.val(l)
                }
            }
        }, a = function (t) {
            n && (setTimeout(function () {
                n = !0;
                var t = o.val().replace(/ /g, ""), e = {keyword: t = t.replace("+", "%2B")};
                if (s.dataHandler) e = s.dataHandler(t); else e = {keyword: t};
                t ? $.post(s.url, e, function (t) {
                    if (s.disPlayData) s.callback(t, d); else {
                        var e = "", i = t.data || [];
                        if (0 == t.code) for (var n = 0, r = i.length; n < r; n++) {
                            var a = i[n];
                            e += '<div class="drop-tip-item t-l" data-value="' + a.kh_value + '" data-type="' + a.kh_type + '"><span>' + a.kh_word + '</span><span class="c-gray">&nbsp;&nbsp;' + a.kh_region_name + "</span></div>"
                        } else console.log(t.message);
                        d.html(e), "" == e && c(), $(".drop-tip-item").click(function () {
                            s.callback(this)
                        })
                    }
                    d.show()
                }, "json") : c()
            }, 500), n = !1)
        };
        $(t).append(d), c(), o.bind("input propertychange", a), "app" != s.platform && (o.bind("blur", function () {
            setTimeout(function () {
                c()
            }, 200)
        }), o.bind("keyup", r))
    }, r.getPositionByAddr = function (e, i, n, t) {
        (new BMap.Geocoder).getPoint(e, function (t) {
            !i instanceof Function || (!0 === n ? null == t ? i(null, null) : i(t.lng, t.lat) : null != t ? i(t.lng, t.lat) : $.messager.alert("警告", "无法获取到地址<" + e + ">的坐标"))
        }, null != t && "" != t ? t : e)
    }, r.source_page = function () {
        var t = "";
        return 0 < document.referrer.length && (t = document.referrer), "undefined" != typeof opener && null != opener && 0 == t.length && 0 < opener.location.href.length && (t = opener.location.href), t
    }, r.tag_data = function (t) {
        var e = "", i = null;
        for (var n in t) i = t[n], t.hasOwnProperty(n) && (e += e ? ',"' + n + '":"' + i + '"' : '{"' + n + '":"' + i + '"');
        return e += "}"
    }, r.checkAll = function (t) {
        $(t).parent().find("input[type=checkbox]").prop("checked", !0)
    }, r.cancelAll = function (t) {
        $(t).parent().find("input[type=checkbox]").prop("checked", !1)
    }, r
}(base || {});

function countdown(t, e, i) {
    $(e).addClass("btn-gray").removeClass("btn-green");
    var n = setInterval(function () {
        t--, $(e).text("重新发送(" + t + ")"), t <= 0 && (clearInterval(n), $(e).text(i).addClass("btn-green").removeClass("btn-gray"))
    }, 1e3)
}

function checkStatus(t) {
    userHandler.isLogin() ? window.location.href = $(t).attr("data-url") : userHandler.login({
        callback: function () {
            window.location.href = $(t).attr("data-url")
        }
    })
}

function suggest() {
    $.post(base.site_url() + "client/memMng/memInfo/getUserMobile", null, function (t) {
        var i = dialog({
            title: "意见反馈",
            padding: 0,
            width: 340,
            content: template("suggest_tpl", {fu_mobile: t.data})
        }).showModal();
        artForm.validate("suggest_form", userHandler.getValidateRules(), function (t, e) {
            t.url = window.location.href, $.post(base.site_url() + "client/service/suggestion/sendSuggestion", {data: JSON.stringify(t)}, function (t) {
                0 == t.code ? (i.remove(), base.alertMsg({
                    text: "提交成功，谢谢！",
                    offset: {x: "0px", y: "160px"}
                })) : base.alertMsg({text: t.message})
            }, "json")
        })
    }, "json");
    try {
        lt_ie10 && $("#suggest_form input").placeholder({isUseSpan: !0})
    } catch (t) {
        console.log(t)
    }
}

!function (t) {
    var e = this;
    this.user = {
        rules: {pu_mobile: {required: !0, range: [13e9, 2e10]}, pu_name: "required", zd_name: "required"},
        messages: {pu_mobile: {required: "请输入电话号码", range: "请输入正确的手机号码"}, pu_name: "请填写用户真实姓名", zd_name: "请输入部门名称"}
    }, this.property = {
        rules: {
            ppt_note: {maxlength: 150},
            ppt_name: {required: !0, minlength: 2, maxlength: 15},
            ppt_city_id: {required: !0},
            ppt_city_area_id: {required: !0},
            ppt_area_id: {required: !0},
            ppt_addr: {required: !0, minlength: 2, maxlength: 15},
            ppt_tel: {minlength: 6, maxlength: 12},
            ppt_build: {range: [1980, 2100]},
            ppt_ratio: {min: .1, max: 20},
            ppt_green: {min: 0, max: 100, maxlength: 3},
            ppt_parking_lot: {min: 0, max: 10, maxlength: 4},
            pc_name: {required: !0}
        },
        messages: {
            ppt_name: {required: "请输入楼盘名称", minlength: "楼盘名称不能少于2个字", maxlength: "楼盘名称不能超过15个字"},
            ppt_city_id: {required: "请选择城市"},
            ppt_city_area_id: {required: "请选择区域"},
            ppt_area_id: {required: "请选择商圈"},
            ppt_addr: {required: "请输入楼盘地址", minlength: "楼盘地址不能少于2个字", maxlength: "楼盘地址不能超过15个字"},
            ppt_tel: {minlength: "楼盘电话不能少于6位", maxlength: "楼盘电话不能超过12位"},
            ppt_build: {range: "请输入正确的建筑年份"},
            ppt_ratio: {min: "容积率不能小于0.1", max: "容积率不能大于20"},
            ppt_green: {min: "绿化率不能小于0", max: "绿化率不能大于100", maxlength: "请输入正确的绿化率，如30%，输入30"},
            ppt_parking_lot: {min: "车位比不能小于0", max: "车位比不能大于10", maxlength: "请输入每户对应的车位数，如0.7"},
            ppt_note: {maxlength: "描述不能超过150字"},
            pc_name: {required: "请输入代理公寓"}
        }
    }, this.office_building = {
        rules: {
            ob_name: {required: !0, minlength: 2, maxlength: 15},
            ob_city_id: {required: !0},
            ob_city_area_id: {required: !0},
            ob_addr: {required: !0, minlength: 2, maxlength: 15},
            ob_tel: {required: !0, minlength: 6, maxlength: 12},
            ob_city_id: {required: !0},
            ob_city_area_id: {required: !0}
        },
        messages: {
            ob_name: {required: "请输入楼盘名称", minlength: "楼盘名称不能少于2个字", maxlength: "楼盘名称不能超过15个字"},
            ob_city_id: {required: "请选择城市"},
            ob_city_area_id: {required: "请选择区域"},
            ob_addr: {required: "请输入楼盘地址", minlength: "楼盘地址不能少于2个字", maxlength: "楼盘地址不能超过15个字"},
            ob_tel: {required: "请输入楼盘电话", minlength: "楼盘电话不能少于6位", maxlength: "楼盘电话不能超过12位"},
            ob_city_id: {required: "请选择城市"},
            ob_city_area_id: {required: "请选择区域"}
        }
    }, this.office_apart = {
        rules: {
            oa_note: {maxlength: 20},
            ob_name: {required: !0},
            oa_decoration: {required: !0},
            oa_type: {required: !0},
            oa_floor: {required: !0, digits: !0, min: 1, max: 1e3},
            oa_seats: {required: !0, digits: !0, min: 1, max: 1e5},
            oa_min_period: {required: !0},
            oa_space: {required: !0, digits: !0, min: 1, max: 1e5},
            oa_rent: {required: !0, digits: !0, min: 1, max: 1e7},
            oa_unit_rent: {required: !0, digits: !0, min: 1, max: 1e8}
        },
        messages: {
            ob_name: {required: "请输入写字楼名称"},
            oa_decoration: {required: "请选择装修"},
            oa_type: {required: "请选择房源类型"},
            oa_floor: {required: "请输入楼层", digits: "楼层必须是整数", min: "楼层不能小于1", max: "请输入正确的楼层"},
            oa_seats: {required: "请输入可容纳工位", digits: "工位必须是整数", min: "工位不能小于1", max: "请输入正确的工位数"},
            oa_min_period: {required: "请选择最短租期"},
            oa_space: {required: "请输入房间面积", digits: "面积必须是整数", min: "面积不能小于1", max: "请输入正确的面积"},
            oa_rent: {required: "请输入租金", digits: "租金必须是整数", min: "租金不能小于1", max: "请输入正确的租金"},
            oa_unit_rent: {required: "请输入单价", digits: "单价必须是整数", min: "单价不能小于1", max: "请输入正确的单价"},
            oa_note: {maxlength: "描述不能超过20字"}
        }
    }, this.apart = {
        rules: {
            ppt_name: "required",
            att_note: {maxlength: 150},
            tp_region_name: {required: !0},
            att_hall_number: {required: !0, digits: !0, min: 0},
            att_floor: {required: !0, digits: !0, min: 1},
            att_top_floor: {required: !0, digits: !0, min: 1},
            att_rooms: {required: !0, digits: !0, min: 1, max: 9},
            att_space: {required: !0, digits: !0, min: 1},
            att_washrooms: {required: !0, digits: !0, min: 0},
            att_beds: {required: !0, digits: !0},
            att_rent: {required: !0, number: !0, min: 1},
            att_deposit: {required: !0, number: !0, min: 1},
            att_decoration: "required",
            att_memo: {maxlength: 12}
        },
        messages: {
            att_note: {maxlength: "房源描述最长不能超过150个字"},
            ppt_name: "请选择楼盘",
            tp_region_name: {required: "请选择区域"},
            att_hall_number: {required: "请输入厅数量", digits: "厅数量必须是整数", min: "厅数量不能小于0"},
            att_floor: {required: "请输入楼层", digits: "楼层必须是整数", min: "楼层不能小于1"},
            att_top_floor: {required: "请输入总楼层", digits: "总楼层必须是整数", min: "总楼层不能小于1"},
            att_rooms: {required: "请输入房间数", digits: "房间数必须是整数", min: "房间数不能小于1", max: "房间数不能大于9"},
            att_space: {required: "请输入面积", digits: "面积必须是整数", min: "面积不能小于1"},
            att_washrooms: {required: "请输入卫生间数", digits: "卫生间数必须是整数", min: "卫生间数不能小于0"},
            att_beds: {required: "请输入床位数", digits: "床位数必须是整数"},
            att_rent: {required: "请输入租金", number: "租金必须是数字", min: "租金不能小于0"},
            att_deposit: {required: "请输入押金", number: "押金必须是数字", min: "押金不能小于0"},
            att_decoration: "请选择装修",
            att_memo: {maxlength: "备注最长为12个字符"}
        }
    }, t.validate_config = function (t) {
        return e[t] || "没有配置信息"
    }
}(base || {}), function (t) {
    "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof module && module.exports ? module.exports = t(require("jquery")) : t(jQuery)
}(function (c) {
    c.extend(c.fn, {
        validate: function (t) {
            if (this.length) {
                var n = c.data(this[0], "validator");
                return n || (this.attr("novalidate", "novalidate"), n = new c.validator(t, this[0]), c.data(this[0], "validator", n), n.settings.onsubmit && (this.on("click.validate", ":submit", function (t) {
                    n.settings.submitHandler && (n.submitButton = t.target), c(this).hasClass("cancel") && (n.cancelSubmit = !0), c(this).attr("formnovalidate")
                }), this.on("submit.validate", function (i) {
                    function t() {
                        var t, e;
                        return !n.settings.submitHandler || (n.submitButton && (t = c("<input type='hidden'/>").attr("name", n.submitButton.name).val(c(n.submitButton).val()).appendTo(n.currentForm)), e = n.settings.submitHandler.call(n, n.currentForm, i), n.submitButton && t.remove(), void 0 !== e && e)
                    }

                    return n.settings.debug && i.preventDefault(), n.cancelSubmit ? (n.cancelSubmit = !1, t()) : n.form() ? n.pendingRequest ? !(n.formSubmitted = !0) : t() : (n.focusInvalid(), !1)
                })), n)
            }
            t && t.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing.")
        }, valid: function () {
            var t, e, i;
            return c(this[0]).is("form") ? t = this.validate().form() : (i = [], t = !0, e = c(this[0].form).validate(), this.each(function () {
                (t = e.element(this) && t) || (i = i.concat(e.errorList))
            }), e.errorList = i), t
        }, rules: function (t, e) {
            if (this.length) {
                var i, n, r, a, s, o, d = this[0];
                if (t) switch (n = (i = c.data(d.form, "validator").settings).rules, r = c.validator.staticRules(d), t) {
                    case"add":
                        c.extend(r, c.validator.normalizeRule(e)), delete r.messages, n[d.name] = r, e.messages && (i.messages[d.name] = c.extend(i.messages[d.name], e.messages));
                        break;
                    case"remove":
                        return e ? (o = {}, c.each(e.split(/\s/), function (t, e) {
                            o[e] = r[e], delete r[e], "required" === e && c(d).removeAttr("aria-required")
                        }), o) : (delete n[d.name], r)
                }
                return (a = c.validator.normalizeRules(c.extend({}, c.validator.classRules(d), c.validator.attributeRules(d), c.validator.dataRules(d), c.validator.staticRules(d)), d)).required && (s = a.required, delete a.required, a = c.extend({required: s}, a), c(d).attr("aria-required", "true")), a.remote && (s = a.remote, delete a.remote, a = c.extend(a, {remote: s})), a
            }
        }
    }), c.extend(c.expr[":"], {
        blank: function (t) {
            return !c.trim("" + c(t).val())
        }, filled: function (t) {
            var e = c(t).val();
            return null !== e && !!c.trim("" + e)
        }, unchecked: function (t) {
            return !c(t).prop("checked")
        }
    }), c.validator = function (t, e) {
        this.settings = c.extend(!0, {}, c.validator.defaults, t), this.currentForm = e, this.init()
    }, c.validator.format = function (i, t) {
        return 1 === arguments.length ? function () {
            var t = c.makeArray(arguments);
            return t.unshift(i), c.validator.format.apply(this, t)
        } : (void 0 === t || (2 < arguments.length && t.constructor !== Array && (t = c.makeArray(arguments).slice(1)), t.constructor !== Array && (t = [t]), c.each(t, function (t, e) {
            i = i.replace(new RegExp("\\{" + t + "\\}", "g"), function () {
                return e
            })
        })), i)
    }, c.extend(c.validator, {
        defaults: {
            messages: {},
            groups: {},
            rules: {},
            errorClass: "error",
            pendingClass: "pending",
            validClass: "valid",
            errorElement: "label",
            focusCleanup: !1,
            focusInvalid: !0,
            errorContainer: c([]),
            errorLabelContainer: c([]),
            onsubmit: !0,
            ignore: ":hidden",
            ignoreTitle: !1,
            onfocusin: function (t) {
                this.lastActive = t, this.settings.focusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, t, this.settings.errorClass, this.settings.validClass), this.hideThese(this.errorsFor(t)))
            },
            onfocusout: function (t) {
                this.checkable(t) || !(t.name in this.submitted) && this.optional(t) || this.element(t)
            },
            onkeyup: function (t, e) {
                9 === e.which && "" === this.elementValue(t) || -1 !== c.inArray(e.keyCode, [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225]) || (t.name in this.submitted || t.name in this.invalid) && this.element(t)
            },
            onclick: function (t) {
                t.name in this.submitted ? this.element(t) : t.parentNode.name in this.submitted && this.element(t.parentNode)
            },
            highlight: function (t, e, i) {
                "radio" === t.type ? this.findByName(t.name).addClass(e).removeClass(i) : c(t).addClass(e).removeClass(i)
            },
            unhighlight: function (t, e, i) {
                "radio" === t.type ? this.findByName(t.name).removeClass(e).addClass(i) : c(t).removeClass(e).addClass(i)
            }
        },
        setDefaults: function (t) {
            c.extend(c.validator.defaults, t)
        },
        messages: {
            required: "This field is required.",
            remote: "Please fix this field.",
            email: "Please enter a valid email address.",
            url: "Please enter a valid URL.",
            date: "Please enter a valid date.",
            dateISO: "Please enter a valid date ( ISO ).",
            number: "Please enter a valid number.",
            digits: "Please enter only digits.",
            equalTo: "Please enter the same value again.",
            maxlength: c.validator.format("Please enter no more than {0} characters."),
            minlength: c.validator.format("Please enter at least {0} characters."),
            rangelength: c.validator.format("Please enter a value between {0} and {1} characters long."),
            range: c.validator.format("Please enter a value between {0} and {1}."),
            max: c.validator.format("Please enter a value less than or equal to {0}."),
            min: c.validator.format("Please enter a value greater than or equal to {0}."),
            step: c.validator.format("Please enter a multiple of {0}.")
        },
        autoCreateRanges: !1,
        prototype: {
            init: function () {
                this.labelContainer = c(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || c(this.currentForm), this.containers = c(this.settings.errorContainer).add(this.settings.errorLabelContainer), this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {}, this.invalid = {}, this.reset();
                var i, n = this.groups = {};

                function t(t) {
                    var e = c.data(this.form, "validator"), i = "on" + t.type.replace(/^validate/, ""), n = e.settings;
                    n[i] && !c(this).is(n.ignore) && n[i].call(e, this, t)
                }

                c.each(this.settings.groups, function (i, t) {
                    "string" == typeof t && (t = t.split(/\s/)), c.each(t, function (t, e) {
                        n[e] = i
                    })
                }), i = this.settings.rules, c.each(i, function (t, e) {
                    i[t] = c.validator.normalizeRule(e)
                }), c(this.currentForm).on("focusin.validate focusout.validate keyup.validate", ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable]", t).on("click.validate", "select, option, [type='radio'], [type='checkbox']", t), this.settings.invalidHandler && c(this.currentForm).on("invalid-form.validate", this.settings.invalidHandler), c(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required", "true")
            }, form: function () {
                return this.checkForm(), c.extend(this.submitted, this.errorMap), this.invalid = c.extend({}, this.errorMap), this.valid() || c(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid()
            }, checkForm: function () {
                this.prepareForm();
                for (var t = 0, e = this.currentElements = this.elements(); e[t]; t++) this.check(e[t]);
                return this.valid()
            }, element: function (t) {
                var e, i, n = this.clean(t), r = this.validationTargetFor(n), a = this, s = !0;
                return void 0 === r ? delete this.invalid[n.name] : (this.prepareElement(r), this.currentElements = c(r), (i = this.groups[r.name]) && c.each(this.groups, function (t, e) {
                    e === i && t !== r.name && (n = a.validationTargetFor(a.clean(a.findByName(t)))) && n.name in a.invalid && (a.currentElements.push(n), s = s && a.check(n))
                }), e = !1 !== this.check(r), s = s && e, this.invalid[r.name] = !e, this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), c(t).attr("aria-invalid", !e)), s
            }, showErrors: function (e) {
                if (e) {
                    var i = this;
                    c.extend(this.errorMap, e), this.errorList = c.map(this.errorMap, function (t, e) {
                        return {message: t, element: i.findByName(e)[0]}
                    }), this.successList = c.grep(this.successList, function (t) {
                        return !(t.name in e)
                    })
                }
                this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
            }, resetForm: function () {
                c.fn.resetForm && c(this.currentForm).resetForm(), this.invalid = {}, this.submitted = {}, this.prepareForm(), this.hideErrors();
                var t = this.elements().removeData("previousValue").removeAttr("aria-invalid");
                this.resetElements(t)
            }, resetElements: function (t) {
                var e;
                if (this.settings.unhighlight) for (e = 0; t[e]; e++) this.settings.unhighlight.call(this, t[e], this.settings.errorClass, ""), this.findByName(t[e].name).removeClass(this.settings.validClass); else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)
            }, numberOfInvalids: function () {
                return this.objectLength(this.invalid)
            }, objectLength: function (t) {
                var e, i = 0;
                for (e in t) t[e] && i++;
                return i
            }, hideErrors: function () {
                this.hideThese(this.toHide)
            }, hideThese: function (t) {
                t.not(this.containers).text(""), this.addWrapper(t).hide()
            }, valid: function () {
                return 0 === this.size()
            }, size: function () {
                return this.errorList.length
            }, focusInvalid: function () {
                if (this.settings.focusInvalid) try {
                    c(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
                } catch (t) {
                }
            }, findLastActive: function () {
                var e = this.lastActive;
                return e && 1 === c.grep(this.errorList, function (t) {
                    return t.element.name === e.name
                }).length && e
            }, elements: function () {
                var t = this, e = {};
                return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image,:button, [disabled]").not(this.settings.ignore).filter(function () {
                    return !this.name && t.settings.debug && window.console && console.error("%o has no name assigned", this), !(this.name in e || !t.objectLength(c(this).rules())) && (e[this.name] = !0)
                })
            }, clean: function (t) {
                return c(t)[0]
            }, errors: function () {
                var t = this.settings.errorClass.split(" ").join(".");
                return c(this.settings.errorElement + "." + t, this.errorContext)
            }, resetInternals: function () {
                this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = c([]), this.toHide = c([])
            }, reset: function () {
                this.resetInternals(), this.currentElements = c([])
            }, prepareForm: function () {
                this.reset(), this.toHide = this.errors().add(this.containers)
            }, prepareElement: function (t) {
                this.reset(), this.toHide = this.errorsFor(t)
            }, elementValue: function (t) {
                var e, i, n = c(t), r = t.type;
                return "radio" === r || "checkbox" === r ? this.findByName(t.name).filter(":checked").val() : "number" === r && void 0 !== t.validity ? t.validity.badInput ? "NaN" : n.val() : (e = n.val(), "file" === r ? "C:\\fakepath\\" === e.substr(0, 12) ? e.substr(12) : 0 <= (i = e.lastIndexOf("/")) ? e.substr(i + 1) : 0 <= (i = e.lastIndexOf("\\")) ? e.substr(i + 1) : e : "string" == typeof e ? e.replace(/\r/g, "") : e)
            }, check: function (e) {
                e = this.validationTargetFor(this.clean(e));
                var t, i, n, r = c(e).rules(), a = c.map(r, function (t, e) {
                    return e
                }).length, s = !1, o = this.elementValue(e);
                if ("function" == typeof r.normalizer) {
                    if ("string" != typeof(o = r.normalizer.call(e, o))) throw new TypeError("The normalizer should return a string value.");
                    delete r.normalizer
                }
                for (i in r) {
                    n = {method: i, parameters: r[i]};
                    try {
                        if ("dependency-mismatch" === (t = c.validator.methods[i].call(this, o, e, n.parameters)) && 1 === a) {
                            s = !0;
                            continue
                        }
                        if (s = !1, "pending" === t) return void(this.toHide = this.toHide.not(this.errorsFor(e)));
                        if (!t) return this.formatAndAdd(e, n), !1
                    } catch (t) {
                        throw this.settings.debug && window.console && console.log("Exception occurred when checking element " + e.id + ", check the '" + n.method + "' method.", t), t instanceof TypeError && (t.message += ".  Exception occurred when checking element " + e.id + ", check the '" + n.method + "' method."), t
                    }
                }
                if (!s) return this.objectLength(r) && this.successList.push(e), !0
            }, customDataMessage: function (t, e) {
                return c(t).data("msg" + e.charAt(0).toUpperCase() + e.substring(1).toLowerCase()) || c(t).data("msg")
            }, customMessage: function (t, e) {
                var i = this.settings.messages[t];
                return i && (i.constructor === String ? i : i[e])
            }, findDefined: function () {
                for (var t = 0; t < arguments.length; t++) if (void 0 !== arguments[t]) return arguments[t]
            }, defaultMessage: function (t, e) {
                var i = this.findDefined(this.customMessage(t.name, e.method), this.customDataMessage(t, e.method), !this.settings.ignoreTitle && t.title || void 0, c.validator.messages[e.method], "<strong>Warning: No message defined for " + t.name + "</strong>"),
                    n = /\$?\{(\d+)\}/g;
                return "function" == typeof i ? i = i.call(this, e.parameters, t) : n.test(i) && (i = c.validator.format(i.replace(n, "{$1}"), e.parameters)), i
            }, formatAndAdd: function (t, e) {
                var i = this.defaultMessage(t, e);
                this.errorList.push({
                    message: i,
                    element: t,
                    method: e.method
                }), this.errorMap[t.name] = i, this.submitted[t.name] = i
            }, addWrapper: function (t) {
                return this.settings.wrapper && (t = t.add(t.parent(this.settings.wrapper))), t
            }, defaultShowErrors: function () {
                var t, e, i;
                for (t = 0; this.errorList[t]; t++) i = this.errorList[t], this.settings.highlight && this.settings.highlight.call(this, i.element, this.settings.errorClass, this.settings.validClass), this.showLabel(i.element, i.message);
                if (this.errorList.length && (this.toShow = this.toShow.add(this.containers)), this.settings.success) for (t = 0; this.successList[t]; t++) this.showLabel(this.successList[t]);
                if (this.settings.unhighlight) for (t = 0, e = this.validElements(); e[t]; t++) this.settings.unhighlight.call(this, e[t], this.settings.errorClass, this.settings.validClass);
                this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show()
            }, validElements: function () {
                return this.currentElements.not(this.invalidElements())
            }, invalidElements: function () {
                return c(this.errorList).map(function () {
                    return this.element
                })
            }, showLabel: function (t, e) {
                var i, n, r, a, s = this.errorsFor(t), o = this.idOrName(t), d = c(t).attr("aria-describedby");
                s.length ? (s.removeClass(this.settings.validClass).addClass(this.settings.errorClass), s.html(e)) : (i = s = c("<" + this.settings.errorElement + ">").attr("id", o + "-error").addClass(this.settings.errorClass).html(e || ""), this.settings.wrapper && (i = s.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()), this.labelContainer.length ? this.labelContainer.append(i) : this.settings.errorPlacement ? this.settings.errorPlacement(i, c(t)) : i.insertAfter(t), s.is("label") ? s.attr("for", o) : 0 === s.parents("label[for='" + this.escapeCssMeta(o) + "']").length && (r = s.attr("id"), d ? d.match(new RegExp("\\b" + this.escapeCssMeta(r) + "\\b")) || (d += " " + r) : d = r, c(t).attr("aria-describedby", d), (n = this.groups[t.name]) && (a = this, c.each(a.groups, function (t, e) {
                    e === n && c("[name='" + a.escapeCssMeta(t) + "']", a.currentForm).attr("aria-describedby", s.attr("id"))
                })))), !e && this.settings.success && (s.text(""), "string" == typeof this.settings.success ? s.addClass(this.settings.success) : this.settings.success(s, t)), this.toShow = this.toShow.add(s)
            }, errorsFor: function (t) {
                var e = this.escapeCssMeta(this.idOrName(t)), i = c(t).attr("aria-describedby"),
                    n = "label[for='" + e + "'], label[for='" + e + "'] *";
                return i && (n = n + ", #" + this.escapeCssMeta(i).replace(/\s+/g, ", #")), this.errors().filter(n)
            }, escapeCssMeta: function (t) {
                return t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1")
            }, idOrName: function (t) {
                return this.groups[t.name] || (this.checkable(t) ? t.name : t.id || t.name)
            }, validationTargetFor: function (t) {
                return this.checkable(t) && (t = this.findByName(t.name)), c(t).not(this.settings.ignore)[0]
            }, checkable: function (t) {
                return /radio|checkbox/i.test(t.type)
            }, findByName: function (t) {
                return c(this.currentForm).find("[name='" + this.escapeCssMeta(t) + "']")
            }, getLength: function (t, e) {
                switch (e.nodeName.toLowerCase()) {
                    case"select":
                        return c("option:selected", e).length;
                    case"input":
                        if (this.checkable(e)) return this.findByName(e.name).filter(":checked").length
                }
                return t.length
            }, depend: function (t, e) {
                return !this.dependTypes[typeof t] || this.dependTypes[typeof t](t, e)
            }, dependTypes: {
                boolean: function (t) {
                    return t
                }, string: function (t, e) {
                    return !!c(t, e.form).length
                }, function: function (t, e) {
                    return t(e)
                }
            }, optional: function (t) {
                var e = this.elementValue(t);
                return !c.validator.methods.required.call(this, e, t) && "dependency-mismatch"
            }, startRequest: function (t) {
                this.pending[t.name] || (this.pendingRequest++, c(t).addClass(this.settings.pendingClass), this.pending[t.name] = !0)
            }, stopRequest: function (t, e) {
                this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[t.name], c(t).removeClass(this.settings.pendingClass), e && 0 === this.pendingRequest && this.formSubmitted && this.form() ? (c(this.currentForm).submit(), this.formSubmitted = !1) : !e && 0 === this.pendingRequest && this.formSubmitted && (c(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1)
            }, previousValue: function (t, e) {
                return c.data(t, "previousValue") || c.data(t, "previousValue", {
                    old: null,
                    valid: !0,
                    message: this.defaultMessage(t, {method: e})
                })
            }, destroy: function () {
                this.resetForm(), c(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")
            }
        },
        classRuleSettings: {
            required: {required: !0},
            email: {email: !0},
            url: {url: !0},
            date: {date: !0},
            dateISO: {dateISO: !0},
            number: {number: !0},
            digits: {digits: !0},
            creditcard: {creditcard: !0}
        },
        addClassRules: function (t, e) {
            t.constructor === String ? this.classRuleSettings[t] = e : c.extend(this.classRuleSettings, t)
        },
        classRules: function (t) {
            var e = {}, i = c(t).attr("class");
            return i && c.each(i.split(" "), function () {
                this in c.validator.classRuleSettings && c.extend(e, c.validator.classRuleSettings[this])
            }), e
        },
        normalizeAttributeRule: function (t, e, i, n) {
            /min|max|step/.test(i) && (null === e || /number|range|text/.test(e)) && (n = Number(n), isNaN(n) && (n = void 0)), n || 0 === n ? t[i] = n : e === i && "range" !== e && (t[i] = !0)
        },
        attributeRules: function (t) {
            var e, i, n = {}, r = c(t), a = t.getAttribute("type");
            for (e in c.validator.methods) i = "required" === e ? ("" === (i = t.getAttribute(e)) && (i = !0), !!i) : r.attr(e), this.normalizeAttributeRule(n, a, e, i);
            return n.maxlength && /-1|2147483647|524288/.test(n.maxlength) && delete n.maxlength, n
        },
        dataRules: function (t) {
            var e, i, n = {}, r = c(t), a = t.getAttribute("type");
            for (e in c.validator.methods) i = r.data("rule" + e.charAt(0).toUpperCase() + e.substring(1).toLowerCase()), this.normalizeAttributeRule(n, a, e, i);
            return n
        },
        staticRules: function (t) {
            var e = {}, i = c.data(t.form, "validator");
            return i.settings.rules && (e = c.validator.normalizeRule(i.settings.rules[t.name]) || {}), e
        },
        normalizeRules: function (n, r) {
            return c.each(n, function (t, e) {
                if (!1 !== e) {
                    if (e.param || e.depends) {
                        var i = !0;
                        switch (typeof e.depends) {
                            case"string":
                                i = !!c(e.depends, r.form).length;
                                break;
                            case"function":
                                i = e.depends.call(r, r)
                        }
                        i ? n[t] = void 0 === e.param || e.param : (c.data(r.form, "validator").resetElements(c(r)), delete n[t])
                    }
                } else delete n[t]
            }), c.each(n, function (t, e) {
                n[t] = c.isFunction(e) && "normalizer" !== t ? e(r) : e
            }), c.each(["minlength", "maxlength"], function () {
                n[this] && (n[this] = Number(n[this]))
            }), c.each(["rangelength", "range"], function () {
                var t;
                n[this] && (c.isArray(n[this]) ? n[this] = [Number(n[this][0]), Number(n[this][1])] : "string" == typeof n[this] && (t = n[this].replace(/[\[\]]/g, "").split(/[\s,]+/), n[this] = [Number(t[0]), Number(t[1])]))
            }), c.validator.autoCreateRanges && (null != n.min && null != n.max && (n.range = [n.min, n.max], delete n.min, delete n.max), null != n.minlength && null != n.maxlength && (n.rangelength = [n.minlength, n.maxlength], delete n.minlength, delete n.maxlength)), n
        },
        normalizeRule: function (t) {
            if ("string" == typeof t) {
                var e = {};
                c.each(t.split(/\s/), function () {
                    e[this] = !0
                }), t = e
            }
            return t
        },
        addMethod: function (t, e, i) {
            c.validator.methods[t] = e, c.validator.messages[t] = void 0 !== i ? i : c.validator.messages[t], e.length < 3 && c.validator.addClassRules(t, c.validator.normalizeRule(t))
        },
        methods: {
            required: function (t, e, i) {
                if (!this.depend(i, e)) return "dependency-mismatch";
                if ("select" !== e.nodeName.toLowerCase()) return this.checkable(e) ? 0 < this.getLength(t, e) : 0 < t.length;
                var n = c(e).val();
                return n && 0 < n.length
            }, email: function (t, e) {
                return this.optional(e) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)
            }, url: function (t, e) {
                return this.optional(e) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)
            }, date: function (t, e) {
                return this.optional(e) || !/Invalid|NaN/.test(new Date(t).toString())
            }, dateISO: function (t, e) {
                return this.optional(e) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)
            }, number: function (t, e) {
                return this.optional(e) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)
            }, digits: function (t, e) {
                return this.optional(e) || /^\d+$/.test(t)
            }, minlength: function (t, e, i) {
                var n = c.isArray(t) ? t.length : this.getLength(t, e);
                return this.optional(e) || i <= n
            }, maxlength: function (t, e, i) {
                var n = c.isArray(t) ? t.length : this.getLength(t, e);
                return this.optional(e) || n <= i
            }, rangelength: function (t, e, i) {
                var n = c.isArray(t) ? t.length : this.getLength(t, e);
                return this.optional(e) || n >= i[0] && n <= i[1]
            }, min: function (t, e, i) {
                return this.optional(e) || i <= t
            }, max: function (t, e, i) {
                return this.optional(e) || t <= i
            }, range: function (t, e, i) {
                return this.optional(e) || t >= i[0] && t <= i[1]
            }, step: function (t, e, i) {
                var n = c(e).attr("type"), r = "Step attribute on input type " + n + " is not supported.",
                    a = new RegExp("\\b" + n + "\\b");
                if (n && !a.test(["text", "number", "range"].join())) throw new Error(r);
                return this.optional(e) || t % i == 0
            }, equalTo: function (t, e, i) {
                var n = c(i);
                return this.settings.onfocusout && n.not(".validate-equalTo-blur").length && n.addClass("validate-equalTo-blur").on("blur.validate-equalTo", function () {
                    c(e).valid()
                }), t === n.val()
            }, remote: function (a, s, t, o) {
                if (this.optional(s)) return "dependency-mismatch";
                o = "string" == typeof o && o || "remote";
                var d, e, i, l = this.previousValue(s, o);
                return this.settings.messages[s.name] || (this.settings.messages[s.name] = {}), l.originalMessage = l.originalMessage || this.settings.messages[s.name][o], this.settings.messages[s.name][o] = l.message, t = "string" == typeof t && {url: t} || t, i = c.param(c.extend({data: a}, t.data)), l.old === i ? l.valid : (l.old = i, (d = this).startRequest(s), (e = {})[s.name] = a, c.ajax(c.extend(!0, {
                    mode: "abort",
                    port: "validate" + s.name,
                    dataType: "json",
                    data: e,
                    context: d.currentForm,
                    success: function (t) {
                        var e, i, n, r = !0 === t || "true" === t;
                        d.settings.messages[s.name][o] = l.originalMessage, r ? (n = d.formSubmitted, d.resetInternals(), d.toHide = d.errorsFor(s), d.formSubmitted = n, d.successList.push(s), d.invalid[s.name] = !1, d.showErrors()) : (e = {}, i = t || d.defaultMessage(s, {
                            method: o,
                            parameters: a
                        }), e[s.name] = l.message = i, d.invalid[s.name] = !0, d.showErrors(e)), l.valid = r, d.stopRequest(s, r)
                    }
                }, t)), "pending")
            }
        }
    });
    var n, r = {};
    c.ajaxPrefilter ? c.ajaxPrefilter(function (t, e, i) {
        var n = t.port;
        "abort" === t.mode && (r[n] && r[n].abort(), r[n] = i)
    }) : (n = c.ajax, c.ajax = function (t) {
        var e = ("mode" in t ? t : c.ajaxSettings).mode, i = ("port" in t ? t : c.ajaxSettings).port;
        return "abort" === e ? (r[i] && r[i].abort(), r[i] = n.apply(this, arguments), r[i]) : n.apply(this, arguments)
    })
});
var userHandler = function () {
    var t, e = $("#login_holder"), a = {
        rules: {
            fu_mobile: {required: !0, range: [13e9, 2e10]},
            fu_password: {required: !0, minlength: 8, maxlength: 16},
            pic_code: "required",
            vcode: "required",
            fu_vcode: "required",
            newpwd: {required: !0, minlength: 8, maxlength: 16, pwcheck: !0},
            content: "required"
        },
        messages: {
            fu_mobile: {required: "请输入手机号码", range: "请输入正确的手机号码"},
            fu_password: {required: "请输入密码", minlength: "密码长度不能小于8位", maxlength: "密码长度不能大于16位"},
            pic_code: "请输入验证码",
            vcode: "请输入短信验证码",
            fu_vcode: "请输入短信验证码",
            newpwd: {required: "请输入密码", minlength: "密码长度不能小于8位", maxlength: "密码长度不能大于16位", pwcheck: "密码必须包含数字和字母"},
            content: "请输入反馈内容"
        }
    }, i = function (t) {
        return '<div class="drop-wrap"><a href="javascript:void(0);"><span class="icon_user"></span><span>' + t + '</span></a><ul class="arrow-top nav-down-wrap"><li><a href="/user" target="_blank">个人中心</a></li><li><a href="javascript:void(0);" onclick="userHandler.logout();">退出登录</a></li></ul></div>'
    }, s = function (e) {
        $.post(base.site_url("client/memMng/memLogin/rand_create"), null, function (t) {
            e(t)
        }, "json")
    }, o = function (t, e, i) {
        e.addClass("sms-button-error");
        var n = setInterval(function () {
            t--, e.text("重新发送(" + t + ")"), t <= 0 && (clearInterval(n), e.text(i).removeClass("sms-button-error"))
        }, 1e3)
    };
    return (t = $.cookie("js_fu_mobile")) ? e.html(i(t)) : e.html('<a class="drop-btn" href="javascript:void(0);" onclick="userHandler.quickLogin();">注册/登录</a>'), {
        isLogin: function () {
            return !!$.cookie("js_fu_mobile")
        }, countdown: function (t, e, i) {
            o(t, e, i)
        }, getValidateRules: function () {
            return a
        }, wechatLogin: function () {
            var t = {url: window.location.pathname};
            $.post(base.site_url("/client/memMng/memWechatLogin/getWechatLoginUrl"), t, function (t) {
                0 === t.code ? window.location.href = t.data : base.alertMsg({text: t.message})
            }, "json")
        }, logout: function () {
            var t = {url: window.location.href};
            $.post(base.site_url("client/memMng/memLogin/logout"), t, function (t) {
                0 === t.code && window.location.reload()
            }, "json")
        }, loginSuccess: function () {
            var t = i($.cookie("js_fu_mobile"));
            e.html(t), dialog.get("registerPopup") && dialog.get("registerPopup").remove(), dialog.get("loginPopup") && dialog.get("loginPopup").remove(), dialog.get("quickLoginPopup") && dialog.get("quickLoginPopup").remove()
        }, getPicCode: function (e) {
            s(function (t) {
                t.data && $(e).html(t.data)
            })
        }, login: function (r) {
            r = r || {}, dialog.get("registerPopup") && dialog.get("registerPopup").remove(), dialog.get("quickLoginPopup") && dialog.get("quickLoginPopup").remove(), s(function (t) {
                if (0 === t.code) {
                    dialog({
                        title: "用户登录",
                        id: "loginPopup",
                        padding: 0,
                        width: 400,
                        height: 360,
                        quickClose: !0,
                        skin: "user-popup",
                        innerHTML: '<div i="dialog"><div  i="body" class="user-popup-body"><div i="content" class="user-popup-content"></div></div><div class="user-popup-footer" i="footer"><div i="statusbar" class="ui-dialog-statusbar"></div><div i="button"></div></div></div>',
                        content: (e = t, n = r && r.fu_mobile, '<div class="account-login-wrap" id="accountLoginWrap" style="height:100%;"><ul class="login-tab"><li class="col-md-6" onclick="userHandler.quickLogin();">手机验证码登录</li><li class="col-md-6 on">账号密码登录</li></ul><form action="" method="post" id="accountLoginForm"><div class="fm-wrap"><div class="input-wrap"><i class="icon-tel"></i><input type="text" name="fu_mobile" value="' + (n = n || "") + '" placeholder="手机号"></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pwd"></i><input type="password" name="fu_password" placeholder="密码"></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" name="pic_code" placeholder="验证码"><div class="pic-wrap" id="pic_code_wrap" onclick="userHandler.getPicCode(this)">' + e.data + '</div></div></div><div class="fm-wrap"><div class="switch-wrap"><div class="col-md-6"><label><input type="checkbox" id="login_remmber_status">记住我</label></div><div class="col-md-6 t-r link" onclick="userHandler.forget();">忘记密码</div><div id="messages_box" class="messages-box"></div></div></div><div class="fm-wrap"><div class="button-wrap"><input type="submit" value="登录"><div class="c-green right-label"><span class="c-gray">还没有账号？</span><span class="link" onclick="userHandler.register();">马上注册</span></div></div></div></form></div>')
                    }).showModal();
                    var i = $("#accountLoginWrap");
                    i.find("#accountLoginForm").validate({
                        rules: a.rules,
                        messages: a.messages,
                        errorLabelContainer: i.find("#messages_box"),
                        submitHandler: function (e) {
                            $(e).find("#login_remmber_status").prop("checked") ? $.cookie("savefu", "yes", {
                                path: "/",
                                expires: 30,
                                domain: "zufun.cn"
                            }) : $.cookie("savefu", "", {expires: -1});
                            var t = artForm.getData(e);
                            return t.fu_password = md5(t.fu_password), base.button_loading(e) && $.post(base.site_url("client/memMng/memLogin/loginByMobile"), {data: JSON.stringify(t)}, function (t) {
                                0 === t.code ? "function" == typeof r.callback ? r.callback() : window.location.reload() : (base.alertMsg({text: t.message}), i.find("#pic_code_wrap").click(), base.reset_button(e, "登录"))
                            }, "json"), !1
                        }
                    });
                    try {
                        lt_ie10 && i.find("input").placeholder({isUseSpan: !0})
                    } catch (t) {
                        console.log(t)
                    }
                }
                var e, n
            })
        }, quickLogin: function (n) {
            n = n || {};
            dialog.get("registerPopup") && dialog.get("registerPopup").remove(), dialog.get("loginPopup") && dialog.get("loginPopup").remove(), s(function (t) {
                var e, i;
                0 === t.code && (dialog({
                    id: "quickLoginPopup",
                    quickClose: !0,
                    padding: 0,
                    width: 400,
                    height: 290,
                    skin: "user-popup",
                    innerHTML: '<div i="dialog"><div  i="body" class="user-popup-body"><div i="content" class="user-popup-content"></div></div><div class="user-popup-footer" i="footer"><div i="statusbar" class="ui-dialog-statusbar"></div><div i="button"></div></div></div>',
                    content: (e = t, i = n && n.fu_mobile, '<div class="quick-login-wrap" id="quickLoginWrap" style="height:100%;"><ul class="login-tab"><li class="col-md-6 on">手机验证码登录</li><li class="col-md-6" onclick="userHandler.login();">账号密码登录</li></ul><form action="" method="post" id="quickLoginForm"><div class="mod-item" id="mod_register"><div class="fm-wrap"><div class="input-wrap"><i class="icon-tel"></i><input type="text" name="fu_mobile" placeholder="手机号" value="' + (i = i || "") + '"><div class="sms-button sms-button-error" id="sms_btn">获取验证码</div></div></div><div id="picCode" class="fm-wrap" style="display:none;"><div class="switch-wrap" style="margin-bottom:0;"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" class="not-post" id="loginPicCode" placeholder="请输入图片验证码"><div class="pic-wrap" id="Lpic_code_wrap" onclick="userHandler.getPicCode(this)">' + e.data + '</div></div></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" name="vcode" placeholder="短信验证码"></div></div><div class="fm-wrap"><div class="switch-wrap"><div id="messages_box" class="messages-box"></div></div></div><div class="fm-wrap"><div class="input-wrap"><input type="submit" value="登录"></div></div></div><div class="mod-item mod-item-validate" id="mod_register_validate"><div class="fm-wrap" style="margin-top:30px;"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" class="not-post" id="quickLoginPicCode" placeholder="请输入图片验证码"><div class="pic-wrap" id="pic_code_wrap" onclick="userHandler.getPicCode(this)">' + e.data + '</div></div></div><div class="fm-wrap"><div class="button-wrap"><div class="fu-button" id="get_vcode_btn">确定</div></div></div></div></form></div>')
                }).showModal(), $html = $("#quickLoginWrap"), $html.find("#quickLoginForm").validate({
                    rules: a.rules,
                    messages: a.messages,
                    errorLabelContainer: $html.find("#messages_box"),
                    debug: !0,
                    submitHandler: function (e) {
                        var t = artForm.getData(e);
                        return t.pic_code = $html.find("#loginPicCode").val(), base.button_loading(e) && $.post(base.site_url("client/memMng/memLogin/registerMemberByMoble"), {data: JSON.stringify(t)}, function (t) {
                            0 == t.code ? userHandler.loginSuccess() : ("ERR_PICCODE" == t.code ? ($("#picCode").css("display", "block"), $(".user-popup-content").css("height", "335"), $html.find("#loginPicCode").val("")) : base.alertMsg({
                                text: t.message,
                                offset: {y: "120px"}
                            }), $html.find("#Lpic_code_wrap").click(), base.reset_button(e, "登录"))
                        }, "json"), !1
                    }
                }), $html.find('input[name="fu_mobile"]').bind("input propertychange", function () {
                    11 == this.value.length && "获取验证码" == $(this).parent().find("#sms_btn").text() ? $(this).parent().find("#sms_btn").removeClass("sms-button-error") : $(this).parent().find("#sms_btn").addClass("sms-button-error")
                }), $html.find("#sms_btn").click(function () {
                    var t = $html.find('input[name="fu_mobile"]').val();
                    t = t.replace(/[^0-9]*/g, ""), $html.find('input[name="fu_mobile"]').val(t), $html.find('input[name="fu_mobile"]').valid() && !$(this).hasClass("sms-button-error") && ($html.find("#mod_register").animate({left: "-400px"}), $html.find("#mod_register_validate").animate({left: "0px"}), $html.find('input[name="pic_code"]').val(""), $html.find("#pic_code_wrap").click())
                }), $html.find("#get_vcode_btn").click(function () {
                    var t = {
                        fu_mobile: $html.find('input[name="fu_mobile"]').val(),
                        pic_code: $html.find("#quickLoginPicCode").val()
                    };
                    $.post(base.site_url("client/memMng/memLogin/sendSmsForReg"), {data: JSON.stringify(t)}, function (t) {
                        0 == t.code ? ($html.find("#mod_register_validate").animate({left: "400px"}), $html.find("#mod_register").animate({left: "0px"}), o(30, $html.find("#sms_btn"), "获取验证码"), $("#picCode").css("display", "none"), $(".user-popup-content").css("height", "290")) : (base.alertMsg({
                            text: t.message,
                            offset: {y: "120px"}
                        }), $html.find("#pic_code_wrap").click())
                    }, "json")
                }));
                try {
                    lt_ie10 && $html.find("input").placeholder({isUseSpan: !0})
                } catch (t) {
                    console.log(t)
                }
            })
        }, register: function (r) {
            r = r || {}, dialog.get("loginPopup") && dialog.get("loginPopup").remove(), dialog.get("quickLoginPopup") && dialog.get("quickLoginPopup").remove(), s(function (t) {
                if (0 === t.code) {
                    dialog({
                        title: "新用户注册",
                        id: "registerPopup",
                        padding: 0,
                        width: 400,
                        height: 290,
                        skin: "user-popup",
                        innerHTML: '<div i="dialog"><div class="user-popup-header"><div i="title" class="user-popup-title"></div><div i="close" class="popup-close icon-close"></div></div><div  i="body" class="user-popup-body"><div i="content" class="user-popup-content"></div></div><div class="user-popup-footer" i="footer"><div i="statusbar" class="ui-dialog-statusbar"></div><div i="button"></div></div></div>',
                        content: (e = t, n = r && r.fu_mobile, '<form action="" method="post" id="register_form"><div class="mod-item" id="mod_register"><div class="fm-wrap"><div class="input-wrap"><i class="icon-tel"></i><input type="text" name="fu_mobile" placeholder="手机号" value="' + (n || "") + '"><div class="sms-button sms-button-error" id="sms_btn">获取验证码</div></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" name="vcode" placeholder="短信验证码"></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pwd"></i><input type="password" name="fu_password" placeholder="设置密码"></div></div><div class="fm-wrap"><div class="switch-wrap"><div id="messages_box" class="messages-box"></div></div></div><div class="fm-wrap"><div class="button-wrap"><input type="submit" value="注册"><div class="c-green right-label"><span class="c-gray">已有账号？</span><span class="link" onclick="userHandler.login();">直接登录</span></div><p style="margin:10px 0;" class="c-gray">注册即视为同意<a class="link c-gray" href="https://www.yizhaofang.cn/protocol" target="_blank">《易找房服务协议》</a></p></div></div></div><div class="mod-item mod-item-validate" id="mod_register_validate"><div class="fm-wrap" style="margin-top:60px;"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" name="pic_code" placeholder="请输入图片验证码"><div class="pic-wrap" id="pic_code_wrap" onclick="userHandler.getPicCode(this)">' + e.data + '</div></div></div><div class="fm-wrap"><div class="button-wrap"><div class="fu-button" id="get_vcode_btn">确定</div></div></div></div></form>')
                    }).showModal();
                    var i = $("#register_form");
                    i.validate({
                        rules: a.rules,
                        messages: a.messages,
                        errorLabelContainer: i.find("#messages_box"),
                        submitHandler: function (e) {
                            var t = artForm.getData(e);
                            return t.fu_password = md5(t.fu_password), base.button_loading(e) && $.post(base.site_url("client/memMng/memLogin/registerMemberByMoble"), {data: JSON.stringify(t)}, function (t) {
                                0 == t.code ? "function" == typeof r.callback ? r.callback() : window.location.reload() : (base.alertMsg({
                                    text: t.message,
                                    offset: {y: "120px"}
                                }), i.find("#pic_code_wrap").click(), base.reset_button(e, "注册"))
                            }, "json"), !1
                        }
                    }), i.find('input[name="fu_mobile"]').bind("input propertychange", function () {
                        11 == this.value.length && "获取验证码" == $(this).parent().find("#sms_btn").text() ? $(this).parent().find("#sms_btn").removeClass("sms-button-error") : $(this).parent().find("#sms_btn").addClass("sms-button-error")
                    }), i.find("#sms_btn").click(function () {
                        i.find('input[name="fu_mobile"]').valid() && !$(this).hasClass("sms-button-error") && (i.find("#mod_register").animate({left: "-400px"}), i.find("#mod_register_validate").animate({left: "0px"}), i.find('input[name="pic_code"]').val(""), i.find("#pic_code_wrap").click())
                    }), i.find("#get_vcode_btn").click(function () {
                        var t = {
                            fu_mobile: i.find('input[name="fu_mobile"]').val(),
                            pic_code: i.find('input[name="pic_code"]').val()
                        };
                        $.post(base.site_url("client/memMng/memLogin/sendSmsForReg"), {data: JSON.stringify(t)}, function (t) {
                            2 != t.code && (i.find("#mod_register_validate").animate({left: "400px"}), i.find("#mod_register").animate({left: "0px"})), 0 == t.code ? o(30, i.find("#sms_btn"), "获取验证码") : (base.alertMsg({
                                text: t.message,
                                offset: {y: "120px"}
                            }), i.find("#pic_code_wrap").click())
                        }, "json")
                    })
                }
                var e, n;
                try {
                    lt_ie10 && i.find("input").placeholder({isUseSpan: !0})
                } catch (t) {
                    console.log(t)
                }
            })
        }, forget: function () {
            dialog.get("quickLogin") && dialog.get("quickLogin").remove(), dialog.get("loginPopup") && dialog.get("loginPopup").remove(), s(function (t) {
                if (0 === t.code) {
                    dialog({
                        title: "忘记密码",
                        id: "forgetPopup",
                        padding: 0,
                        width: 400,
                        height: 260,
                        skin: "user-popup",
                        innerHTML: '<div i="dialog"><div class="user-popup-header"><div i="title" class="user-popup-title"></div><div i="close" class="popup-close icon-close"></div></div><div  i="body" class="user-popup-body"><div i="content" class="user-popup-content"></div></div><div class="user-popup-footer" i="footer"><div i="statusbar" class="ui-dialog-statusbar"></div><div i="button"></div></div></div>',
                        content: (e = t, '<form action="" method="post" id="forgetForm"><div class="mod-item" id="mod_register"><div class="fm-wrap"><div class="input-wrap"><i class="icon-tel"></i><input type="text" name="fu_mobile" placeholder="手机号" value="' + (n || "") + '"><div class="sms-button sms-button-error" id="sms_btn">获取验证码</div></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" name="fu_vcode" placeholder="短信验证码"></div></div><div class="fm-wrap"><div class="input-wrap"><i class="icon-pwd"></i><input type="password" name="newpwd" placeholder="设置密码"></div></div><div class="fm-wrap"><div class="switch-wrap"><div id="messages_box" class="messages-box"></div></div></div><div class="fm-wrap"><div class="input-wrap"><input type="submit" value="重置密码"></div></div></div><div class="mod-item mod-item-validate" id="mod_register_validate"><div class="fm-wrap" style="margin-top:60px;"><div class="input-wrap"><i class="icon-pcode"></i><input type="text" name="pic_code" placeholder="请输入图片验证码"><div class="pic-wrap" id="pic_code_wrap" onclick="userHandler.getPicCode(this)">' + e.data + '</div></div></div><div class="fm-wrap"><div class="button-wrap"><div class="fu-button" id="get_vcode_btn">确定</div></div></div></div></form>')
                    }).showModal();
                    var i = $("#forgetForm");
                    i.validate({
                        rules: a.rules,
                        messages: a.messages,
                        errorLabelContainer: i.find("#messages_box"),
                        submitHandler: function (e) {
                            var t = artForm.getData(e);
                            return t.newpwd = md5(t.newpwd), base.button_loading(e) && $.post(base.site_url("client/memMng/memLogin/modifyPwdByMobile"), {data: JSON.stringify(t)}, function (t) {
                                0 == t.code ? window.location.reload() : (base.alertMsg({
                                    text: t.message,
                                    offset: {y: "120px"}
                                }), i.find("#pic_code_wrap").click(), base.reset_button(e, "重置密码"))
                            }, "json"), !1
                        }
                    }), i.find('input[name="fu_mobile"]').bind("input propertychange", function () {
                        11 == this.value.length && "获取验证码" == $(this).parent().find("#sms_btn").text() ? $(this).parent().find("#sms_btn").removeClass("sms-button-error") : $(this).parent().find("#sms_btn").addClass("sms-button-error")
                    }), i.find("#sms_btn").click(function () {
                        i.find('input[name="fu_mobile"]').valid() && !$(this).hasClass("sms-button-error") && (i.find("#mod_register").animate({left: "-400px"}), i.find("#mod_register_validate").animate({left: "0px"}), i.find('input[name="pic_code"]').val(""), i.find("#pic_code_wrap").click())
                    }), i.find("#get_vcode_btn").click(function () {
                        var t = {
                            fu_mobile: i.find('input[name="fu_mobile"]').val(),
                            pic_code: i.find('input[name="pic_code"]').val()
                        };
                        $.post(base.site_url("client/memMng/memLogin/sendSmsForForgetPswd"), {data: JSON.stringify(t)}, function (t) {
                            0 == t.code ? (i.find("#mod_register_validate").animate({left: "400px"}), i.find("#mod_register").animate({left: "0px"}), o(30, i.find("#sms_btn"), "获取验证码")) : (base.alertMsg({
                                text: t.message,
                                offset: {y: "120px"}
                            }), i.find("#pic_code_wrap").click())
                        }, "json")
                    })
                }
                var e, n;
                try {
                    lt_ie10 && i.find("input").placeholder({isUseSpan: !0})
                } catch (t) {
                    console.log(t)
                }
            })
        }
    }
}();

function User() {
}

function UserLogin(t) {
    var e = this;
    this.$target = $(t), this.$validTarget = this.$target.find("input[name='pic_code']"), this.$button = this.$target.find("input[type='submit']"), this.$picTarget = this.$target.find(".pic-wrap").first(), this.validate(), this.getPicCode(this.$picTarget), this.$picTarget.click(function () {
        e.getPicCode(e.$picTarget)
    }), this.judgeButtonStatus(this.$target, this.$button, this.$validTarget)
}

function UserQuickLogin(t) {
    var e = this;
    this.$target = $(t), this.$validTarget = this.$target.find("input[name='vcode']"), this.$button = this.$target.find("input[type='submit']"), this.$picForm = this.$target.find(".pic-form").first(), this.$smsButton = this.$target.find(".sms-button").first(), "userAppointForm2" != this.$target.attr("id") && "userAppointForm3" != this.$target.attr("id") ? (this.$picTarget = this.$target.find(".pic-wrap").first(), this.$picButton = this.$target.find(".pic-button").first()) : (this.$picTarget = $("#picCodeModal").find(".pic-wrap").first(), this.$picButton = $("#picCodeModal").find(".pic-button").first()), this.validate(), this.judgeSmsButtonStatus(this.$target, this.$smsButton), this.judgeButtonStatus(this.$target, this.$button, this.$validTarget), this.$picTarget.click(), this.$picTarget.click(function () {
        e.getPicCode(e.$picTarget)
    }), this.$smsButton.click(function () {
        0, e.getVcodeQuickLogin()
    }), this.$picButton.click(function () {
        "userAppointForm2" != e.$target.attr("id") && "userAppointForm3" != e.$target.attr("id") || e.$target.find('input[name="pic_code"]').val($("#picCodeModal").find('input[name="pic_code"]').val()), e.getVcodeQuickLogin()
    })
}

function UserForget(t) {
    var e = this;
    this.$target = $(t), this.$validTarget = this.$target.find("input[name='fu_password']"), this.$button = this.$target.find("input[type='submit']"), this.$picTarget = this.$target.find(".pic-wrap").first(), this.$picForm = this.$target.find(".pic-form").first(), this.$smsButton = this.$target.find(".sms-button").first(), this.$picButton = this.$target.find(".pic-button").first(), this.validate(), this.judgeSmsButtonStatus(this.$target, this.$smsButton), this.judgeButtonStatus(this.$target, this.$button, this.$validTarget), this.getPicCode(this.$picTarget), this.$picTarget.click(function () {
        e.getPicCode(e.$picTarget)
    }), this.$smsButton.click(function () {
        e.getVcodeForget()
    }), this.$picButton.click(function () {
        e.getVcodeForget()
    })
}

function UserRegister(t) {
    var e = this;
    this.$target = $(t), this.$validTarget = this.$target.find("input[name='fu_password']"), this.$button = this.$target.find("input[type='submit']"), this.$picTarget = this.$target.find(".pic-wrap").first(), this.$picForm = this.$target.find(".pic-form").first(), this.$smsButton = this.$target.find(".sms-button").first(), this.$picButton = this.$target.find(".pic-button").first(), this.validate(), this.judgeSmsButtonStatus(this.$target, this.$smsButton), this.judgeButtonStatus(this.$target, this.$button, this.$validTarget), this.$picTarget.click(function () {
        e.getPicCode(e.$picTarget)
    }), this.$smsButton.click(function () {
        e.getVcodeRegister()
    }), this.$picButton.click(function () {
        e.getVcodeRegister()
    })
}

function UserLogout() {
    this.logout()
}

function UserFactory(t, e) {
    try {
        switch (t) {
            case"login":
                return new UserLogin(e);
            case"forget":
                return new UserForget(e);
            case"quickLogin":
                return new UserQuickLogin(e);
            case"register":
                return new UserRegister(e)
        }
    } catch (t) {
        console.log(t)
    }
}

function UserAppoint(t) {
    var e = this;
    this.$target = $(t), this.apartment_id = this.$target.attr("data-id"), this.fu_mobile = this.$target.attr("data-mobile"), this.apt_type = this.$target.attr("data-type"), this.isLogin() ? this.appoint() : ("zf" == this.$target.data("href") && ($("#appointModal").modal("show"), $("#appointModal :submit").attr("data-id", this.apartment_id), $("#appointModal :submit").attr("data-type", this.apt_type)), User.prototype.callback = function () {
        e.appoint(), _hmt.push(["_trackEvent", "pc", "appointment", "zufang"])
    })
}

jQuery.validator.addMethod("pwcheck", function (t, e) {
    return /[0-9]/.test(t) && (/[a-z]/.test(t) || /[A-Z]/.test(t))
}, "密码必须包含数字和字母"), User.prototype.validateRules = {
    rules: {
        fu_mobile: {required: !0, range: [13e9, 2e10]},
        fu_password: {required: !0, minlength: 8, maxlength: 16},
        pic_code: "required",
        vcode: "required",
        fu_vcode: "required",
        newpwd: {required: !0, minlength: 8, maxlength: 16, pwcheck: !0},
        content: "required"
    },
    messages: {
        fu_mobile: {required: "请输入手机号码", range: "请输入正确的手机号码"},
        fu_password: {required: "请输入密码", minlength: "密码长度不能小于8位", maxlength: "密码长度不能大于16位"},
        pic_code: "请输入验证码",
        vcode: "请输入短信验证码",
        fu_vcode: "请输入短信验证码",
        newpwd: {required: "请输入密码", minlength: "密码长度不能小于8位", maxlength: "密码长度不能大于16位", pwcheck: "密码必须包含数字和字母"},
        content: "请输入反馈内容"
    }
}, User.prototype.getPicCode = function (e) {
    $.post(base.site_url("client/memMng/memLogin/rand_create"), null, function (t) {
        t.data && e.html(t.data)
    }, "json")
}, User.prototype.getVcode = function (t, e) {
    $.post(base.site_url("client/memMng/memLogin/sendSmsForReg"), {data: JSON.stringify(t)}, function (t) {
        e instanceof Function && ($(".msg-group").show(), e(t))
    }, "json")
}, User.prototype.isLogin = function () {
    return !!$.cookie("js_fu_mobile")
}, User.prototype.countDown = function (t, e, i) {
    e.addClass("sms-button-error");
    var n = setInterval(function () {
        t--, e.text("重新发送(" + t + ")"), t <= 0 && (clearInterval(n), e.text(i).removeClass("sms-button-error"))
    }, 1e3)
}, User.prototype.judgeButtonStatus = function (t, e, i) {
    i.bind("propertychange input", function () {
        $(this).valid() && (t.valid() ? e.removeClass("btn-disabled") : e.hasClass("btn-disabled") || e.addClass("btn-disabled"))
    })
}, User.prototype.judgeSmsButtonStatus = function (t, e, i) {
    t.find("input[name='fu_mobile']").bind("propertychange input", function () {
        11 == this.value.length && "获取验证码" == e.text() ? e.removeClass("sms-button-error") : e.hasClass("sms-button-error") || e.addClass("sms-button-error")
    })
}, UserLogin.prototype = new User, UserLogin.prototype.validate = function () {
    var i = this;
    i.$target.validate({
        rules: i.validateRules.rules,
        messages: i.validateRules.messages,
        debug: !0,
        submitHandler: function (t) {
            var e = artForm.getData(t);
            return e.fu_password = md5(e.fu_password), console.log(e), i.$button.button("loading"), $.post(base.site_url("client/memMng/memLogin/loginByMobile"), {data: JSON.stringify(e)}, function (t) {
                0 === t.code ? window.location.reload() : (base.alertMsg({text: t.message}), i.$button.button("reset"), i.getPicCode(i.$picTarget))
            }, "json"), !1
        }
    })
}, UserQuickLogin.prototype = new User, UserQuickLogin.prototype.getVcodeQuickLogin = function () {
    var e = this;
    if (this.$target.find("input[name='fu_mobile']").valid() && !this.$smsButton.hasClass("sms-button-error")) {
        if ("userAppointForm" == e.$target.attr("id") || "userAppointForm2" == e.$target.attr("id") || "userAppointForm3" == e.$target.attr("id")) var t = {
            fu_mobile: e.$target.find('input[name="fu_mobile"]').val(),
            pic_code: e.$target.find('input[name="pic_code"]').val(),
            reg_type: "appoint"
        }; else t = {
            fu_mobile: e.$target.find('input[name="fu_mobile"]').val(),
            pic_code: e.$target.find('input[name="pic_code"]').val()
        };
        e.getVcode(t, function (t) {
            switch (t.code) {
                case 0:
                    e.countDown(30, e.$smsButton, "获取验证码"), "userAppointForm2" != e.$target.attr("id") && "userAppointForm3" != e.$target.attr("id") ? (e.$target.find("#mod_register").animate({left: "0px"}), e.$target.find("#mod_register_validate").animate({left: "400px"})) : $("#picCodeModal").modal("hide");
                    break;
                case 1:
                case 2:
                    base.alertMsg({text: t.message}), "userAppointForm2" != e.$target.attr("id") && "userAppointForm3" != e.$target.attr("id") ? (e.$target.find("#mod_register").animate({left: "-400px"}), e.$target.find("#mod_register_validate").animate({left: "0px"})) : ($("#picCodeModal").modal("show"), $("#picCodeModal").find('input[name="pic_code"]').focus()), e.getPicCode(e.$picTarget);
                    break;
                case"ERR_PICCODE":
                    "userAppointForm2" != e.$target.attr("id") && "userAppointForm3" != e.$target.attr("id") ? (e.$target.find("#mod_register").animate({left: "-400px"}), e.$target.find("#mod_register_validate").animate({left: "0px"}), e.$picForm.show()) : ($("#picCodeModal").modal("show"), $("#picCodeModal").find('input[name="pic_code"]').focus()), e.getPicCode(e.$picTarget)
            }
        })
    }
}, UserQuickLogin.prototype.validate = function () {
    var i = this;
    i.$target.validate({
        rules: i.validateRules.rules,
        messages: i.validateRules.messages,
        debug: !0,
        submitHandler: function (t) {
            var e = artForm.getData(t);
            return e.pic_code = i.$target.find('input[name="pic_code"]').val(), i.$button.button("loading"), "userAppointForm" == i.$target.attr("id") || "userAppointForm2" == i.$target.attr("id") || "userAppointForm3" == i.$target.attr("id") ? ("userAppointForm" == i.$target.attr("id") ? (e.apartment_id = i.$target.find(":submit").attr("data-id"), e.apt_type = i.$target.find(":submit").attr("data-type")) : (e.apartment_id = i.$target.find('[data-toggle="user:appoint"]').attr("data-id"), e.apt_type = i.$target.find('[data-toggle="user:appoint"]').attr("data-type")), $.post(base.site_url("client/memMng/memAppointment/addApptByMobile"), {data: JSON.stringify(e)}, function (t) {
                3 === t.code || 4 == t.code || 5 == t.code ? ($("#appointModal").modal("hide"), 1 == e.apt_type ? _hmt.push(["_trackEvent", "pc", "appointment", "zufang"]) : 3 != e.apt_type && 4 != e.apt_type || _hmt.push(["_trackEvent", "pc", "appointment", "office"]), dialog({
                    title: "预约成功",
                    width: 500,
                    height: 300,
                    padding: 0,
                    cancel: function () {
                        return window.location.reload(), !1
                    },
                    cancelDisplay: !1
                }).showModal(), $.post(base.site_url("client/apart/apart/createUserApptQrcode"), {mem_appointment_id: t.data}, function (t) {
                    0 === t.code && dialog({
                        title: "预约成功",
                        width: 500,
                        height: 300,
                        padding: 0,
                        content: '<div class="t-c wx-wrap"><div><img src="' + t.data + '" width="144" height="144" /></div><div class="wx-info"><p>打开微信扫一扫，关注“租房网”微信公众号</p><p>实时接收预约通知，查看联系方式，一键导航</span></p></div></div>',
                        cancel: function () {
                            return window.location.reload(), !1
                        },
                        cancelDisplay: !1
                    }).showModal()
                }, "json")) : 2 == t.code ? (base.alertMsg({text: t.message}), setTimeout(function () {
                    window.location.reload()
                }, 500)) : "ERR_PICCODE" == t.code ? (base.alertMsg({text: "请输入图片验证码"}), i.$button.button("reset"), "userAppointForm2" != i.$target.attr("id") && "userAppointForm3" != i.$target.attr("id") ? (i.$target.find("#mod_register").animate({left: "-400px"}), i.$target.find("#mod_register_validate").animate({left: "0px"}), i.$picForm.show()) : ($("#picCodeModal").modal("show"), $("#picCodeModal").find('input[name="pic_code"]').focus()), i.getPicCode(i.$picTarget)) : (base.alertMsg({text: t.message}), i.$button.button("reset"))
            }, "json")) : $.post(base.site_url("client/memMng/memLogin/registerMemberByMoble"), {data: JSON.stringify(e)}, function (t) {
                0 === t.code ? "userAppointForm" == i.$target.attr("id") || "userAppointForm2" == i.$target.attr("id") || "userAppointForm3" == i.$target.attr("id") ? (i.callback(), i.callback = "") : "/user/apt/new" == i.$target.attr("data-url") ? window.location.href = base.site_url("user/apt/new") : window.location.reload() : "ERR_PICCODE" == t.code ? (base.alertMsg({text: "请输入图片验证码"}), i.$button.button("reset"), "userAppointForm2" != i.$target.attr("id") && "userAppointForm3" != i.$target.attr("id") ? (i.$target.find("#mod_register").animate({left: "-400px"}), i.$target.find("#mod_register_validate").animate({left: "0px"}), i.$picForm.show()) : ($("#picCodeModal").modal("show"), $("#picCodeModal").find('input[name="pic_code"]').focus()), i.getPicCode(i.$picTarget)) : (base.alertMsg({text: t.message}), i.$button.button("reset"))
            }, "json"), !1
        }
    })
}, UserForget.prototype = new User, UserForget.prototype.getVcode = function (t, e) {
    $.post(base.site_url("client/memMng/memLogin/sendSmsForForgetPswd"), {data: JSON.stringify(t)}, function (t) {
        e instanceof Function && e(t)
    }, "json")
}, UserForget.prototype.getVcodeForget = function () {
    var e = this;
    if (this.$target.find("input[name='fu_mobile']").valid() && !this.$smsButton.hasClass("sms-button-error")) {
        var t = {
            fu_mobile: e.$target.find('input[name="fu_mobile"]').val(),
            pic_code: e.$target.find('input[name="pic_code"]').val()
        };
        e.getVcode(t, function (t) {
            switch (t.code) {
                case 0:
                    e.countDown(30, e.$smsButton, "获取验证码"), e.$target.find("#mod_register").animate({left: "0px"}), e.$target.find("#mod_register_validate").animate({left: "400px"});
                    break;
                case 1:
                case 2:
                    base.alertMsg({text: t.message}), e.$target.find("#mod_register").animate({left: "-400px"}), e.$target.find("#mod_register_validate").animate({left: "0px"}), e.getPicCode(e.$picTarget);
                    break;
                case"ERR_PICCODE":
                    base.alertMsg({text: "请输入图片验证码"}), e.$target.find("#mod_register").animate({left: "-400px"}), e.$target.find("#mod_register_validate").animate({left: "0px"}), e.$picForm.show(), e.getPicCode(e.$picTarget)
            }
        })
    }
}, UserForget.prototype.validate = function () {
    var i = this;
    i.$target.validate({
        rules: i.validateRules.rules,
        messages: i.validateRules.messages,
        debug: !0,
        submitHandler: function (t) {
            var e = artForm.getData(t);
            return e.fu_password = md5(e.fu_password), console.log(e), i.$button.button("loading"), $.post(base.site_url("client/memMng/memLogin/modifyPwdByMobile"), {data: JSON.stringify(e)}, function (t) {
                0 === t.code ? window.location.reload() : (base.alertMsg({text: t.message}), i.$button.button("reset"))
            }, "json"), !1
        }
    })
}, UserRegister.prototype = new User, UserRegister.prototype.getVcodeRegister = function () {
    var e = this;
    if (this.$target.find("input[name='fu_mobile']").valid() && !this.$smsButton.hasClass("sms-button-error")) {
        var t = {
            fu_mobile: e.$target.find('input[name="fu_mobile"]').val(),
            pic_code: e.$target.find('input[name="pic_code"]').val()
        };
        e.getVcode(t, function (t) {
            switch (t.code) {
                case 0:
                    e.countDown(30, e.$smsButton, "获取验证码"), e.$target.find("#mod_register").animate({left: "0px"}), e.$target.find("#mod_register_validate").animate({left: "400px"});
                    break;
                case 1:
                    base.alertMsg({text: t.message}), e.$target.find("#mod_register").animate({left: "-400px"}), e.$target.find("#mod_register_validate").animate({left: "0px"}), e.getPicCode(e.$picTarget);
                    break;
                case"ERR_PICCODE":
                    base.alertMsg({text: "请输入图片验证码"}), e.$target.find("#mod_register").animate({left: "-400px"}), e.$target.find("#mod_register_validate").animate({left: "0px"}), e.$picForm.show(), e.getPicCode(e.$picTarget)
            }
        })
    }
}, UserRegister.prototype.validate = function () {
    var i = this;
    i.$target.validate({
        rules: i.validateRules.rules,
        messages: i.validateRules.messages,
        debug: !0,
        submitHandler: function (t) {
            var e = artForm.getData(t);
            return e.fu_password = md5(e.fu_password), i.$button.button("loading"), $.post(base.site_url("client/memMng/memLogin/registerMemberByMoble"), {data: JSON.stringify(e)}, function (t) {
                0 === t.code ? window.location.reload() : (base.alertMsg({text: t.message}), i.$button.button("reset"))
            }, "json"), !1
        }
    })
}, UserLogout.prototype = new User, UserLogout.prototype.logout = function () {
    var t = {url: window.location.href};
    $.post(base.site_url("client/memMng/memLogin/logout"), t, function (t) {
        0 === t.code && window.location.reload()
    }, "json")
}, $(function () {
    $(document).on("click", "[data-toggle='logout']", function () {
        return new UserLogout
    })
}), $.fn.login = function () {
    return this.each(function () {
        new UserFactory("login", this)
    })
}, $.fn.quickLogin = function () {
    return this.each(function () {
        new UserFactory("quickLogin", this)
    })
}, $.fn.quickLogin.Contructor = UserQuickLogin, $.fn.forget = function () {
    return this.each(function () {
        new UserFactory("forget", this)
    })
}, $.fn.register = function () {
    return this.each(function () {
        new UserFactory("register", this)
    })
}, UserAppoint.prototype = new User, UserAppoint.prototype.appoint = function () {
    $("#appointModal").modal("hide");
    var e = this, t = {apartment_id: e.apartment_id, fu_mobile: e.fu_mobile, apt_type: e.apt_type},
        i = e.$target.data("success");
    0 < i ? e.createUserApptQrcode(i) : $.post(base.site_url("client/memMng/memAppointment/addAppointment"), t, function (t) {
        3 === t.code || 4 == t.code || 5 == t.code ? (dialog({
            title: "预约成功",
            width: 500,
            height: 300,
            padding: 0,
            cancel: function () {
                return window.location.reload(), !1
            },
            cancelDisplay: !1
        }).showModal(), e.createUserApptQrcode(t.data)) : 2 == t.code ? (base.alertMsg({text: t.message}), setTimeout(function () {
            window.location.reload()
        }, 500)) : base.alertMsg({text: t.message})
    }, "json")
}, UserAppoint.prototype.createUserApptQrcode = function (t) {
    var e = {mem_appointment_id: t};
    $.post(base.site_url("client/apart/apart/createUserApptQrcode"), e, function (t) {
        0 === t.code && dialog({
            title: "预约成功",
            width: 500,
            height: 300,
            padding: 0,
            content: '<div class="t-c wx-wrap"><div><img src="' + t.data + '" width="144" height="144" /></div><div class="wx-info"><p>打开微信扫一扫，关注“租房网”微信公众号</p><p>实时接收预约通知，查看联系方式，一键导航</span></p></div></div>',
            cancel: function () {
                return window.location.reload(), !1
            },
            cancelDisplay: !1
        }).showModal()
    }, "json")
}, $(function () {
    $(document).on("click", '[data-toggle="user:appoint"]', function (t) {
        var e = $(this);
        e.attr("href");
        return e.is("a") && t.preventDefault(), new UserAppoint(e)
    })
}), function () {
    //var user = $("#username").attr("value");
    var c = 1;
    var b = 0;
    var t = $("#login_holder"), e = $.cookie("js_fu_mobile");
    0 ? t.html('<div class="drop-wrap"><a href="javascript:void(0);"><span class="icon_user"></span><span>' + b + '</span></a><ul class="arrow-top nav-down-wrap"><li><a href="/user" target="_blank">个人中心</a></li><li><a href="javascript:void(0);" data-toggle="logout">退出登录</a></li></ul>') : t.html('<a href="#loginModal" rel="noffolow" data-toggle="modal" data-target="#loginModal">注册/登录</a>')
}(), $(window).bind("load", function () {
    setTimeout(function () {
        $(".nearby-item img.lazy").trigger("sporty")
    }, 2e3)
}), $(function () {
    $("img.lazy").lazyload({event: "scroll"}), $(".swiper-wrapper").hover(function () {
        $("img.lazy").lazyload({event: "scroll"})
    }), $(".icon").click(function () {
        $("img.lazy").lazyload({event: "scroll"})
    }), $(".nearby-item img.lazy").lazyload({event: "sporty"}), $("#registerForm").register(), $("#quickLoginForm").quickLogin(), $("#userAppointForm").quickLogin(), $("#userAppointForm2").quickLogin(), $("#userAppointForm3").quickLogin(), $("#forgetModal").on("show.bs.modal", function (t) {
        $("#forgetForm").forget(), $("#loginModal").modal("hide")
    }), $("#registerModal").on("show.bs.modal", function (t) {
        $("#loginModal").modal("hide")
    }), $("#loginModal").on("show.bs.modal", function (t) {
        $("#loginForm").login(), $("#registerModal").modal("hide")
    })
}), function () {
    var r = {};

    function t(t, e) {
        r[t] = e
    }

    t("jquery", function () {
        return jQuery
    }), t("popup", function (t) {
        var T = t("jquery"), r = !("minWidth" in T("html")[0].style), a = !r;

        function s() {
            this.destroyed = !1, this.__popup = T("<div />").css({
                display: "none",
                position: "absolute",
                outline: 0
            }).attr("tabindex", "-1").html(this.innerHTML).appendTo("body"), this.__backdrop = this.__mask = T("<div />").css({
                opacity: .7,
                background: "#000"
            }), this.node = this.__popup[0], this.backdrop = this.__backdrop[0]
        }

        return T.extend(s.prototype, {
            node: null,
            backdrop: null,
            fixed: !1,
            destroyed: !0,
            open: !1,
            returnValue: "",
            autofocus: !0,
            align: "bottom left",
            innerHTML: "",
            className: "ui-popup",
            show: function (t) {
                if (this.destroyed) return this;
                var e = this.__popup, i = this.__backdrop;
                if (this.__activeElement = this.__getActive(), this.open = !0, this.follow = t || this.follow, !this.__ready) {
                    if (e.addClass(this.className).attr("role", this.modal ? "alertdialog" : "dialog").css("position", this.fixed ? "fixed" : "absolute"), r || T(window).on("resize", T.proxy(this.reset, this)), this.modal) {
                        var n = {
                            position: "fixed",
                            left: 0,
                            top: 0,
                            width: "100%",
                            height: "100%",
                            overflow: "hidden",
                            userSelect: "none",
                            zIndex: this.zIndex || s.zIndex
                        };
                        e.addClass(this.className + "-modal"), a || T.extend(n, {
                            position: "absolute",
                            width: T(window).width() + "px",
                            height: T(document).height() + "px"
                        }), i.css(n).attr({tabindex: "0"}).on("focus", T.proxy(this.focus, this)), this.__mask = i.clone(!0).attr("style", "").insertAfter(e), i.addClass(this.className + "-backdrop").insertBefore(e), this.__ready = !0
                    }
                    e.html() || e.html(this.innerHTML)
                }
                return e.addClass(this.className + "-show").show(), i.show(), this.reset().focus(), this.__dispatchEvent("show"), this
            },
            showModal: function () {
                return this.modal = !0, this.show.apply(this, arguments)
            },
            close: function (t) {
                return !this.destroyed && this.open && (void 0 !== t && (this.returnValue = t), this.__popup.hide().removeClass(this.className + "-show"), this.__backdrop.hide(), this.open = !1, this.blur(), this.__dispatchEvent("close")), this
            },
            remove: function () {
                if (this.destroyed) return this;
                for (var t in this.__dispatchEvent("beforeremove"), s.current === this && (s.current = null), this.__popup.remove(), this.__backdrop.remove(), this.__mask.remove(), r || T(window).off("resize", this.reset), this.__dispatchEvent("remove"), this) delete this[t];
                return this
            },
            reset: function () {
                var t = this.follow;
                return t ? this.__follow(t) : this.__center(), this.__dispatchEvent("reset"), this
            },
            focus: function () {
                var t = this.node, e = this.__popup, i = s.current, n = this.zIndex = s.zIndex++;
                if (i && i !== this && i.blur(!1), !T.contains(t, this.__getActive())) {
                    var r = e.find("[autofocus]")[0];
                    !this._autofocus && r ? this._autofocus = !0 : r = t, this.__focus(r)
                }
                return e.css("zIndex", n), s.current = this, e.addClass(this.className + "-focus"), this.__dispatchEvent("focus"), this
            },
            blur: function () {
                var t = this.__activeElement;
                return !1 !== arguments[0] && this.__focus(t), this._autofocus = !1, this.__popup.removeClass(this.className + "-focus"), this.__dispatchEvent("blur"), this
            },
            addEventListener: function (t, e) {
                return this.__getEventListener(t).push(e), this
            },
            removeEventListener: function (t, e) {
                for (var i = this.__getEventListener(t), n = 0; n < i.length; n++) e === i[n] && i.splice(n--, 1);
                return this
            },
            __getEventListener: function (t) {
                var e = this.__listener;
                return e || (e = this.__listener = {}), e[t] || (e[t] = []), e[t]
            },
            __dispatchEvent: function (t) {
                var e = this.__getEventListener(t);
                this["on" + t] && this["on" + t]();
                for (var i = 0; i < e.length; i++) e[i].call(this)
            },
            __focus: function (t) {
                try {
                    this.autofocus && !/^iframe$/i.test(t.nodeName) && t.focus()
                } catch (t) {
                }
            },
            __getActive: function () {
                try {
                    var t = document.activeElement, e = t.contentDocument;
                    return e && e.activeElement || t
                } catch (t) {
                }
            },
            __center: function () {
                var t = this.__popup, e = T(window), i = T(document), n = this.fixed, r = n ? 0 : i.scrollLeft(),
                    a = n ? 0 : i.scrollTop(), s = e.width(), o = e.height(), d = (s - t.width()) / 2 + r,
                    l = 382 * (o - t.height()) / 1e3 + a, c = t[0].style;
                c.left = Math.max(parseInt(d), r) + "px", c.top = Math.max(parseInt(l), a) + "px"
            },
            __follow: function (t) {
                var e = t.parentNode && T(t), i = this.__popup;
                if (this.__followSkin && i.removeClass(this.__followSkin), e) {
                    var n = e.offset();
                    if (n.left * n.top < 0) return this.__center()
                }
                var r = this.fixed, a = T(window), s = T(document), o = a.width(), d = a.height(), l = s.scrollLeft(),
                    c = s.scrollTop(), u = i.width(), p = i.height(), h = e ? e.outerWidth() : 0,
                    f = e ? e.outerHeight() : 0, g = this.__offset(t), m = g.left, v = g.top, b = r ? m - l : m,
                    _ = r ? v - c : v, w = r ? 0 : l, $ = r ? 0 : c, y = w + o - u, x = $ + d - p, k = {},
                    C = this.align.split(" "), q = this.className + "-",
                    A = {top: "bottom", bottom: "top", left: "right", right: "left"},
                    L = {top: "top", bottom: "top", left: "left", right: "left"},
                    M = [{top: _ - p, bottom: _ + f, left: b - u, right: b + h}, {
                        top: _,
                        bottom: _ - p + f,
                        left: b,
                        right: b - u + h
                    }], S = {left: b + h / 2 - u / 2, top: _ + f / 2 - p / 2}, F = {left: [w, y], top: [$, x]};
                T.each(C, function (t, e) {
                    M[t][e] > F[L[e]][1] && (e = C[t] = A[e]), M[t][e] < F[L[e]][0] && (C[t] = A[e])
                }), C[1] || (L[C[1]] = "left" === L[C[0]] ? "top" : "left", M[1][C[1]] = S[L[C[1]]]), q += C.join("-") + " " + this.className + "-follow", this.__followSkin = q, e && i.addClass(q), k[L[C[0]]] = parseInt(M[0][C[0]]), k[L[C[1]]] = parseInt(M[1][C[1]]), i.css(k)
            },
            __offset: function (t) {
                var e = t.parentNode, i = e ? T(t).offset() : {left: t.pageX, top: t.pageY},
                    n = (t = e ? t : t.target).ownerDocument, r = n.defaultView || n.parentWindow;
                if (r == window) return i;
                var a = r.frameElement, s = T(n), o = s.scrollLeft(), d = s.scrollTop(), l = T(a).offset(), c = l.left,
                    u = l.top;
                return {left: i.left + c - o, top: i.top + u - d}
            }
        }), s.zIndex = 1024, s.current = null, s
    }), t("dialog-config", {
        backdropBackground: "#000",
        backdropOpacity: .7,
        content: '<span class="ui-dialog-loading">Loading..</span>',
        title: "",
        statusbar: "",
        button: null,
        ok: null,
        cancel: null,
        okValue: "ok",
        cancelValue: "cancel",
        cancelDisplay: !0,
        width: "",
        height: "",
        padding: "",
        skin: "",
        quickClose: !1,
        cssUri: "../css/ui-dialog.css",
        innerHTML: '<div i="dialog" class="ui-dialog"><div class="ui-dialog-arrow-a"></div><div class="ui-dialog-arrow-b"></div><table class="ui-dialog-grid"><tr><td i="header" class="ui-dialog-header"><button i="close" class="ui-dialog-close">&#215;</button><div i="title" class="ui-dialog-title"></div></td></tr><tr><td i="body" class="ui-dialog-body"><div i="content" class="ui-dialog-content"></div></td></tr><tr><td i="footer" class="ui-dialog-footer"><div i="statusbar" class="ui-dialog-statusbar"></div><div i="button" class="ui-dialog-button"></div></td></tr></table></div>'
    }), t("dialog", function (t) {
        var o = t("jquery"), s = t("popup"), e = t("dialog-config"), i = e.cssUri;
        if (i) {
            var n = t[t.toUrl ? "toUrl" : "resolve"];
            n && (i = '<link rel="stylesheet" href="' + (i = n(i)) + '" />', o("base")[0] ? o("base").before(i) : o("head").append(i))
        }
        var d = 0, l = new Date - 0, r = !("minWidth" in o("html")[0].style),
            c = "createTouch" in document && !("onmousemove" in document) || /(iPhone|iPad|iPod)/i.test(navigator.userAgent),
            u = !r && !c, p = function (t, e, i) {
                var n = t = t || {};
                "string" != typeof t && 1 !== t.nodeType || (t = {
                    content: t,
                    fixed: !c
                }), (t = o.extend(!0, {}, p.defaults, t)).original = n;
                var r = t.id = t.id || l + d, a = p.get(r);
                return a ? a.focus() : (u || (t.fixed = !1), t.quickClose, o.isArray(t.button) || (t.button = []), void 0 !== i && (t.cancel = i), t.cancel && t.button.push({
                    id: "cancel",
                    value: t.cancelValue,
                    callback: t.cancel,
                    display: t.cancelDisplay
                }), void 0 !== e && (t.ok = e), t.ok && t.button.push({
                    id: "ok",
                    value: t.okValue,
                    callback: t.ok,
                    autofocus: !0
                }), p.list[r] = new p.create(t))
            }, a = function () {
            };
        a.prototype = s.prototype;
        var h = p.prototype = new a;
        return p.create = function (t) {
            var a = this;
            o.extend(this, new s), t.original;
            var e = o(this.node).html(t.innerHTML), i = o(this.backdrop);
            return this.options = t, this._popup = e, o.each(t, function (t, e) {
                "function" == typeof a[t] ? a[t](e) : a[t] = e
            }), t.zIndex && (s.zIndex = t.zIndex), e.attr({
                "aria-labelledby": this._$("title").attr("id", "title:" + this.id).attr("id"),
                "aria-describedby": this._$("content").attr("id", "content:" + this.id).attr("id")
            }), this._$("close").css("display", !1 === this.cancel ? "none" : "").attr("title", this.cancelValue).on("click", function (t) {
                a._trigger("cancel"), t.preventDefault()
            }), this._$("dialog").addClass(this.skin), this._$("body").css("padding", this.padding), t.quickClose && i.on("onmousedown" in document ? "mousedown" : "click", function () {
                return a._trigger("cancel"), !1
            }), this.addEventListener("show", function () {
                i.css({opacity: 0, background: t.backdropBackground}).animate({opacity: t.backdropOpacity}, 150)
            }), this._esc = function (t) {
                var e = t.target, i = e.nodeName, n = s.current === a, r = t.keyCode;
                !n || /^input|textarea$/i.test(i) && "button" !== e.type || 27 === r && a._trigger("cancel")
            }, o(document).on("keydown", this._esc), this.addEventListener("remove", function () {
                o(document).off("keydown", this._esc), delete p.list[this.id]
            }), d++, p.oncreate(this), this
        }, p.create.prototype = h, o.extend(h, {
            content: function (t) {
                var e = this._$("content");
                return "object" == typeof t ? (t = o(t), e.empty("").append(t.show()), this.addEventListener("beforeremove", function () {
                    o("body").append(t.hide())
                })) : e.html(t), this.reset()
            }, title: function (t) {
                return this._$("title").text(t), this._$("header")[t ? "show" : "hide"](), this
            }, width: function (t) {
                return this._$("content").css("width", t), this.reset()
            }, height: function (t) {
                return this._$("content").css("height", t), this.reset()
            }, button: function (t) {
                t = t || [];
                var r = this, a = "", s = 0;
                return this.callbacks = {}, "string" == typeof t ? (a = t, s++) : o.each(t, function (t, e) {
                    var i = e.id = e.id || e.value, n = "";
                    r.callbacks[i] = e.callback, !1 === e.display ? n = ' style="display:none"' : s++, a += '<button type="button" i-id="' + i + '"' + n + (e.disabled ? " disabled" : "") + (e.autofocus ? ' autofocus class="ui-dialog-autofocus"' : "") + ">" + e.value + "</button>", r._$("button").on("click", "[i-id=" + i + "]", function (t) {
                        o(this).attr("disabled") || r._trigger(i), t.preventDefault()
                    })
                }), this._$("button").html(a), this._$("footer")[s ? "show" : "hide"](), this
            }, statusbar: function (t) {
                return this._$("statusbar").html(t)[t ? "show" : "hide"](), this
            }, _$: function (t) {
                return this._popup.find("[i=" + t + "]")
            }, _trigger: function (t) {
                var e = this.callbacks[t];
                return "function" != typeof e || !1 !== e.call(this) ? this.close().remove() : this
            }
        }), p.oncreate = o.noop, p.getCurrent = function () {
            return s.current
        }, p.get = function (t) {
            return void 0 === t ? p.list : p.list[t]
        }, p.list = {}, p.defaults = e, p
    }), window.dialog = function t(e) {
        var i = r[e], n = "exports";
        return "object" == typeof i ? i : (i[n] || (i[n] = {}, i[n] = i.call(i[n], t, i[n], i) || i[n]), i[n])
    }("dialog")
}(), function () {
    function y(t) {
        return "'" + t.replace(/('|\\)/g, "\\$1").replace(/\r/g, "\\r").replace(/\n/g, "\\n") + "'"
    }

    function s(t, r) {
        function n(t) {
            return c += t.split(/\n/).length - 1, i && (t = t.replace(/\s+/g, " ").replace(/<!--[\w\W]*?-->/g, "")), t && (t = h[1] + y(t) + h[2] + "\n"), t
        }

        function a(t) {
            var e = c;
            if (d ? t = d(t, r) : s && (t = t.replace(/\n/g, function () {
                return "$line=" + ++c + ";"
            })), 0 === t.indexOf("=")) {
                var i = l && !/^=[=#]/.test(t);
                if (t = t.replace(/^=[=#]?|[\s;]*$/g, ""), i) {
                    var n = t.replace(/\s*\([^\)]+\)/, "");
                    x[n] || /^(include|print)$/.test(n) || (t = "$escape(" + t + ")")
                } else t = "$string(" + t + ")";
                t = h[1] + t + h[2]
            }
            return s && (t = "$line=" + e + ";" + t), C(t.replace(q, "").replace(A, ",").replace(L, "").replace(M, "").replace(S, "").split(F), function (t) {
                var e;
                t && !u[t] && (e = "print" === t ? g : "include" === t ? m : x[t] ? "$utils." + t : k[t] ? "$helpers." + t : "$data." + t, v += t + "=" + e + ",", u[t] = !0)
            }), t + "\n"
        }

        var s = r.debug, e = r.openTag, o = r.closeTag, d = r.parser, i = r.compress, l = r.escape, c = 1,
            u = {$data: 1, $filename: 1, $utils: 1, $helpers: 1, $out: 1, $line: 1}, p = "".trim,
            h = p ? ["$out='';", "$out+=", ";", "$out"] : ["$out=[];", "$out.push(", ");", "$out.join('')"],
            f = p ? "$out+=text;return $out;" : "$out.push(text);",
            g = "function(){var text=''.concat.apply('',arguments);" + f + "}",
            m = "function(filename,data){data=data||$data;var text=$utils.$include(filename,data,$filename);" + f + "}",
            v = "'use strict';var $utils=this,$helpers=$utils.$helpers," + (s ? "$line=0," : ""), b = h[0],
            _ = "return new String(" + h[3] + ");";
        C(t.split(e), function (t) {
            var e = (t = t.split(o))[0], i = t[1];
            1 === t.length ? b += n(e) : (b += a(e), i && (b += n(i)))
        });
        var w = v + b + _;
        s && (w = "try{" + w + "}catch(e){throw {filename:$filename,name:'Render Error',message:e.message,line:$line,source:" + y(t) + ".split(/\\n/)[$line-1].replace(/^\\s+/,'')};}");
        try {
            var $ = new Function("$data", "$filename", w);
            return $.prototype = x, $
        } catch (t) {
            throw t.temp = "function anonymous($data,$filename) {" + w + "}", t
        }
    }

    var g = function (t, e) {
        return "string" == typeof e ? c(e, {filename: t}) : i(t, e)
    };
    g.version = "3.0.0", g.config = function (t, e) {
        o[t] = e
    };
    var o = g.defaults = {openTag: "<%", closeTag: "%>", escape: !0, cache: !0, compress: !1, parser: null},
        d = g.cache = {};
    g.render = function (t, e) {
        return c(t, e)
    };
    var i = g.renderFile = function (t, e) {
        var i = g.get(t) || l({filename: t, name: "Render Error", message: "Template not found"});
        return e ? i(e) : i
    };
    g.get = function (t) {
        var e;
        if (d[t]) e = d[t]; else if ("object" == typeof document) {
            var i = document.getElementById(t);
            if (i) {
                var n = (i.value || i.innerHTML).replace(/^\s*|\s*$/g, "");
                e = c(n, {filename: t})
            }
        }
        return e
    };
    var n = function (t, e) {
        return "string" != typeof t && ("number" === (e = typeof t) ? t += "" : t = "function" === e ? n(t.call(t)) : ""), t
    }, e = {"<": "&#60;", ">": "&#62;", '"': "&#34;", "'": "&#39;", "&": "&#38;"}, r = function (t) {
        return e[t]
    }, a = Array.isArray || function (t) {
        return "[object Array]" === {}.toString.call(t)
    }, x = g.utils = {
        $helpers: {}, $include: i, $string: n, $escape: function (t) {
            return n(t).replace(/&(?![\w#]+;)|[<>"']/g, r)
        }, $each: function (t, e) {
            var i, n;
            if (a(t)) for (i = 0, n = t.length; i < n; i++) e.call(t, t[i], i, t); else for (i in t) e.call(t, t[i], i)
        }
    };
    g.helper = function (t, e) {
        k[t] = e
    };
    var k = g.helpers = x.$helpers;
    g.onerror = function (t) {
        var e = "Template Error\n\n";
        for (var i in t) e += "<" + i + ">\n" + t[i] + "\n\n";
        "object" == typeof console && console.error(e)
    };
    var l = function (t) {
            return g.onerror(t), function () {
                return "{Template Error}"
            }
        }, c = g.compile = function (i, n) {
            function t(e) {
                try {
                    return new a(e, r) + ""
                } catch (t) {
                    return n.debug ? l(t)() : (n.debug = !0, c(i, n)(e))
                }
            }

            for (var e in n = n || {}, o) void 0 === n[e] && (n[e] = o[e]);
            var r = n.filename;
            try {
                var a = s(i, n)
            } catch (t) {
                return t.filename = r || "anonymous", t.name = "Syntax Error", l(t)
            }
            return t.prototype = a.prototype, t.toString = function () {
                return a.toString()
            }, r && n.cache && (d[r] = t), t
        }, C = x.$each,
        q = /\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|\s*\.\s*[$\w\.]+/g,
        A = /[^\w$]+/g,
        L = new RegExp(["\\b" + "break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined".replace(/,/g, "\\b|\\b") + "\\b"].join("|"), "g"),
        M = /^\d[^,]*|,\d[^,]*/g, S = /^,+|,+$/g, F = /^$|,+/;
    o.openTag = "{{", o.closeTag = "}}";
    o.parser = function (t) {
        var e, i, n, r, a, s = (t = t.replace(/^\s/, "")).split(" "), o = s.shift(), d = s.join(" ");
        switch (o) {
            case"if":
                t = "if(" + d + "){";
                break;
            case"else":
                t = "}else" + (s = "if" === s.shift() ? " if(" + s.join(" ") + ")" : "") + "{";
                break;
            case"/if":
                t = "}";
                break;
            case"each":
                var l = s[0] || "$data";
                "as" !== (s[1] || "as") && (l = "[]"), t = "$each(" + l + ",function(" + ((s[2] || "$value") + "," + (s[3] || "$index")) + "){";
                break;
            case"/each":
                t = "});";
                break;
            case"echo":
                t = "print(" + d + ");";
                break;
            case"print":
            case"include":
                t = o + "(" + s.join(",") + ");";
                break;
            default:
                if (/^\s*\|\s*[\w\$]/.test(d)) {
                    var c = !0;
                    0 === t.indexOf("#") && (t = t.substr(1), c = !1);
                    for (var u = 0, p = t.split("|"), h = p.length, f = p[u++]; u < h; u++) e = f, i = p[u], a = n = void 0, n = i.split(":"), r = n.shift(), (a = n.join(":") || "") && (a = ", " + a), f = "$helpers." + r + "(" + e + a + ")";
                    t = (c ? "=" : "=#") + f
                } else t = g.helpers[o] ? "=#" + o + "(" + s.join(",") + ");" : "=" + t
        }
        return t
    }, "function" == typeof define ? define(function () {
        return g
    }) : "undefined" != typeof exports ? module.exports = g : this.template = g
}(), function (o, n, r, d) {
    var l = o(n);
    o.fn.lazyload = function (t) {
        function e() {
            var e = 0;
            a.each(function () {
                var t = o(this);
                if (!s.skip_invisible || t.is(":visible")) if (o.abovethetop(this, s) || o.leftofbegin(this, s)) ; else if (o.belowthefold(this, s) || o.rightoffold(this, s)) {
                    if (++e > s.failure_limit) return !1
                } else t.trigger("appear"), e = 0
            })
        }

        var i, a = this, s = {
            threshold: 0,
            failure_limit: 0,
            event: "scroll",
            effect: "show",
            container: n,
            data_attribute: "original",
            skip_invisible: !0,
            appear: null,
            load: null,
            placeholder: ""
        };
        return t && (d !== t.failurelimit && (t.failure_limit = t.failurelimit, delete t.failurelimit), d !== t.effectspeed && (t.effect_speed = t.effectspeed, delete t.effectspeed), o.extend(s, t)), i = s.container === d || s.container === n ? l : o(s.container), 0 === s.event.indexOf("scroll") && i.bind(s.event, function () {
            return e()
        }), this.each(function () {
            var n = this, r = o(n);
            n.loaded = !1, (r.attr("src") === d || !1 === r.attr("src")) && r.is("img") && r.attr("src", s.placeholder), r.one("appear", function () {
                if (!this.loaded) {
                    if (s.appear) {
                        var t = a.length;
                        s.appear.call(n, t, s)
                    }
                    o("<img />").bind("load", function () {
                        var t = r.attr("data-" + s.data_attribute);
                        r.hide(), r.is("img") ? r.attr("src", t) : r.css("background-image", "url('" + t + "')"), r[s.effect](s.effect_speed), n.loaded = !0;
                        var e = o.grep(a, function (t) {
                            return !t.loaded
                        });
                        if (a = o(e), s.load) {
                            var i = a.length;
                            s.load.call(n, i, s)
                        }
                    }).attr("src", r.attr("data-" + s.data_attribute))
                }
            }), 0 !== s.event.indexOf("scroll") && r.bind(s.event, function () {
                n.loaded || r.trigger("appear")
            })
        }), l.bind("resize", function () {
            e()
        }), /(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion) && l.bind("pageshow", function (t) {
            t.originalEvent && t.originalEvent.persisted && a.each(function () {
                o(this).trigger("appear")
            })
        }), o(r).ready(function () {
            e()
        }), this
    }, o.belowthefold = function (t, e) {
        return (e.container === d || e.container === n ? (n.innerHeight ? n.innerHeight : l.height()) + l.scrollTop() : o(e.container).offset().top + o(e.container).height()) <= o(t).offset().top - e.threshold
    }, o.rightoffold = function (t, e) {
        return (e.container === d || e.container === n ? l.width() + l.scrollLeft() : o(e.container).offset().left + o(e.container).width()) <= o(t).offset().left - e.threshold
    }, o.abovethetop = function (t, e) {
        return (e.container === d || e.container === n ? l.scrollTop() : o(e.container).offset().top) >= o(t).offset().top + e.threshold + o(t).height()
    }, o.leftofbegin = function (t, e) {
        return (e.container === d || e.container === n ? l.scrollLeft() : o(e.container).offset().left) >= o(t).offset().left + e.threshold + o(t).width()
    }, o.inviewport = function (t, e) {
        return !(o.rightoffold(t, e) || o.leftofbegin(t, e) || o.belowthefold(t, e) || o.abovethetop(t, e))
    }, o.extend(o.expr[":"], {
        "below-the-fold": function (t) {
            return o.belowthefold(t, {threshold: 0})
        }, "above-the-top": function (t) {
            return !o.belowthefold(t, {threshold: 0})
        }, "right-of-screen": function (t) {
            return o.rightoffold(t, {threshold: 0})
        }, "left-of-screen": function (t) {
            return !o.rightoffold(t, {threshold: 0})
        }, "in-viewport": function (t) {
            return o.inviewport(t, {threshold: 0})
        }, "above-the-fold": function (t) {
            return !o.belowthefold(t, {threshold: 0})
        }, "right-of-fold": function (t) {
            return o.rightoffold(t, {threshold: 0})
        }, "left-of-fold": function (t) {
            return !o.rightoffold(t, {threshold: 0})
        }
    })
}(jQuery, window, document);